/* * Copyright 2011 by Graz University of Technology, Austria * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint * initiative of the Federal Chancellery Austria and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. */ package at.gv.egiz.stal.service.impl; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public final class TestSignatureData { public static final String[] ID = new String[] {"signed-data-reference-0-1214921968-27971781-24309", "signed-data-reference-1"}; public static final String ENCODING = "UTF-8"; public static final Map HASHDATA_INPUT = new HashMap(); static { try { HASHDATA_INPUT.put(ID[0], "Ich bin ein einfacher Text. lläöü߀".getBytes(ENCODING)); HASHDATA_INPUT.put(ID[1], "2te referenz".getBytes(ENCODING)); } catch (UnsupportedEncodingException ex) { Logger log = LoggerFactory.getLogger(TestSignatureData.class); log.error("failed to init signature test data", ex); } } public static final Map HASHDATA_MIMETYPES = new HashMap(); static { HASHDATA_MIMETYPES.put(ID[0], "text/plain"); HASHDATA_MIMETYPES.put(ID[1], "any/mime-type"); } // private static final byte[] signedInfo = " id('signed-data-object-0-1214921968-27971781-13578')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM=yV6Q+I60buqR4mMaxA7fi+CV35A=".getBytes(); // private static final byte[] signedInfo2Ref = " id('signed-data-object-0-1214921968-27971781-13578')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM= id('signed-data-object-1')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM=yV6Q+I60buqR4mMaxA7fi+CV35A=".getBytes(); // private static final String signedInfo2Ref = " id('signed-data-object-1')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM="; /** * SIGNED_INFO[0] contains reference ID[0] * SIGNED_INFO[1] contains reference ID[0] and ID[1] */ public static final List SIGNED_INFO = new ArrayList(); static { SIGNED_INFO.add(" id('signed-data-object-0-1214921968-27971781-13578')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM=yV6Q+I60buqR4mMaxA7fi+CV35A=".getBytes()); SIGNED_INFO.add(" id('signed-data-object-0-1214921968-27971781-13578')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM= id('signed-data-object-1')/node() H1IePEEfGQ2SG03H6LTzw1TpCuM=yV6Q+I60buqR4mMaxA7fi+CV35A=".getBytes()); } }