本文整理了Java中eu.europa.esig.dss.utils.Utils.fromBase64()
方法的一些代码示例,展示了Utils.fromBase64()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.fromBase64()
方法的具体详情如下:
包路径:eu.europa.esig.dss.utils.Utils
类名称:Utils
方法名:fromBase64
暂无
代码示例来源:origin: esig/dss
/**
* This method loads a certificate from a base 64 encoded String
*
* @param base64Encoded
* the base64 encoded certificate
* @return the certificate token
*/
public static CertificateToken loadCertificateFromBase64EncodedString(final String base64Encoded) {
final byte[] bytes = Utils.fromBase64(base64Encoded);
return loadCertificate(bytes);
}
代码示例来源:origin: esig/dss
/**
* This method loads an OCSP response from the given base 64 encoded string.
*
* @param base64Encoded
* base 64 encoded OCSP response
* @return the {@code BasicOCSPResp} object
* @throws IOException
* if IO error occurred
*/
public static BasicOCSPResp loadOCSPBase64Encoded(final String base64Encoded) throws IOException {
final byte[] derEncoded = Utils.fromBase64(base64Encoded);
final OCSPResp ocspResp = new OCSPResp(derEncoded);
return fromRespToBasic(ocspResp);
}
代码示例来源:origin: esig/dss
@Test
public void fromBase64() {
assertArrayEquals(new byte[] { 1, 2, 3, 4, 5 }, Utils.fromBase64("AQIDBAU="));
assertArrayEquals(new byte[] { 1, 2, 3, 4, 5 }, Utils.fromBase64("\nAQI\nD BA\tU=\n"));
}
代码示例来源:origin: esig/dss
@Test
public void testOCSPUniversign() {
String ocspResponse = "MIIGtwoBAKCCBrAwggasBgkrBgEFBQcwAQEEggadMIIGmTCCAWuhgY8wgYwxCzAJBgNVBAYTAkZSMSAwHgYDVQQKExdDcnlwdG9sb2cgSW50ZXJuYXRpb25hbDEcMBoGA1UECxMTMDAwMiA0MzkxMjkxNjQwMDAyNjEfMB0GA1UECxMWVW5pdmVyc2lnbiBDQSBoYXJkd2FyZTEcMBoGA1UEAxMTVW5pdmVyc2lnbiBPQ1NQIDAwMRgTMjAxODAyMTMwNjI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lnbiBPQ1NQIDAwMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJtzQKxWEHOI3D1BK0a0MM2QLfRS1YJiELwXnwASHyknBXKF6XCwgGGDmCiGKcJMG8VE1tzqCEgct7LULSVqDwEX0Sdr504Dqw+MQ/ACQvxwk6Kkgm8NI074QqJeFt7rn9cpeAilEYSCdJ4XNJDeADtN2JeD5NXCQ52mCjngRtuwUdBBM73O/tuJhNub/Tm4e0HX2o3xGHKpEWnCimjzygMgi+kEkGgX7lTmnLbakhmPEsbQExhGrt5nxylQOPbmNzFSxrcltGbtT7FNr2f70j6AjFYJV/ZfVDgLcx/Iq4f3M9hOMmJ0jufMBE2lTSlVCWIRe5GJRuIj8ieit8R3cU0CAwEAAaOBhDCBgTAOBgNVHQ8BAf8EBAMCB4AwDwYJKwYBBQUHMAEFBAIFADAdBgNVHQ4EFgQUDAy8daUzTEsPBHAvS4f0AblpjGAwEwYDVR0lBAwwCgYIKwYBBQUHAwkwCQYDVR0TBAIwADAfBgNVHSMEGDAWgBRg5DDd7nrU0H5dJdn9O3shZE/duzANBgkqhkiG9w0BAQsFAAOCAQEAVtVY8g5/KOi+Z41MWXxNaruRuWBroO0QMuJBtd1Qt26URp6O+2M8TfzbNJ7my/gNeuPokPXKcakmWfiYLlchxNsOU8/HrW5mDF4KRv4RgPJouG83GF2iPfyGF01lfPLxuIIuD+XIfzaKp6xlyh6o7kAQ5JoAW9mUSwqMRtUNgxXfOoLXOBBqfSqnt05/OLIyEYrHZ0Wr8B6JDKq0N74W/H+fyXRy936F5vce6oWwHPsCSCJBTpt3a1je9QxeS/mRTkA+HqlGZA6wA0MkZzuSSSoDreIDaCKrYOA2OU3cbrSslGpi0e11ek8xWJU0vg7uWCjuXwbk8cc50n7wflM8zg==";
ExternalResourcesOCSPSource ocspSource = new ExternalResourcesOCSPSource(new ByteArrayInputStream(Utils.fromBase64(ocspResponse)));
CertificateToken userUniversign = DSSUtils.loadCertificateFromBase64EncodedString(
"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WzS/vrj0Sczv5hAt8reE1Eg1uQcx6+aSUBqJ6a+1TbM7PtkHg1ozgbmVXGuiOLyviLhhUo8XmeeGEhux+cyRNiYCs37VPN5OVrKks29dspMkvllkexfrxiPfc+gB58EU+iNEcip/YrZLu4ZqErlCePIVBLyX9skb7QwKXDW8XBIgAzpoBj0U9/4Vxaiyj209xT1Uuz2vKsuT8Hq7I1vt7miYviHg/ovsWXH6yGcNomxX55l0qWQ4z+mGlVhCLDPMKmspY5D+1kSqsCAwEAAaOB8jCB7zA7BgNVHSAENDAyMDAGBFUdIAAwKDAmBggrBgEFBQcCARYaaHR0cDovL2RvY3MudW5pdmVyc2lnbi5ldS8wEgYDVR0TAQH/BAgwBgEB/wIBADBMBgNVHR8ERTBDMEGgP6A9hjtodHRwOi8vY3JsLnVuaXZlcnNpZ24uZXUvdW5pdmVyc2lnbl9wcmltYXJ5X2NhX2hhcmR3YXJlLmNybDAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFGDkMN3uetTQfl0l2f07eyFkT927MB8GA1UdIwQYMBaAFE3Z/Kgtx8hapK1fSa5opNyeihIiMA0GCSqGSIb3DQEBCwUAA4IBAQAQrQJxwn+DBwN+KTt75IuOkaPOnZ+FfmF/1V7zDt3YNz7n1hRXlflbx9wBJn30TwyuTuZ/Cq1gEiA+TJMrsdZPKvagY8a/q7oCm6jYw6cBhopErwV/sZ9R3Ic+fphKSxoEnygpZs4uKMU2bB7nbul+sdJkP/OrIHKfHydMk3ayeAxnnieOj8EU+Z5w3fpekOGOtb4VUTESWU/xQfDZcNaauNRU2DYFi1eDypfVnyD8tORDoFVaAqzdIJuMJ06jJB5fnmNBXU7GOQFLcdK7hy3ZDmPNh5FNGnaQRrlY2st7lXfV3mu9AgHmjPjxrbAwgo1GzLRY0byI9bfitN0sLT+d");
OCSPToken ocspToken = ocspSource.getRevocationToken(userUniversign, caUniversign);
ocspToken.extractInfo();
assertNotNull(ocspToken);
assertNotNull(ocspToken.getArchiveCutOff());
assertNotNull(ocspToken.getThisUpdate());
assertNotNull(ocspToken.getNextUpdate());
assertNotNull(ocspToken.getProductionDate());
assertNotNull(ocspToken.getBasicOCSPResp());
assertNotNull(ocspToken.getCertId());
assertNull(ocspToken.getExpiredCertsOnCRL());
assertTrue(ocspToken.getStatus());
}
代码示例来源:origin: esig/dss
@Test
public void testOCSP() {
String ocspResponse = "MIIFmgoBAKCCBZMwggWPBgkrBgEFBQcwAQEEggWAMIIFfDCBk6IWBBRG9FLh93YFoTCS3jTUkgpprd/GtRgPMjAxODAyMTMwNjMyNDhaMFMwUTA8MAkGBSsOAwIaBQAEFMzG72J5OVL0/31Lq6L3ZXYqftwTBBQ0Fhvx02RnYkyjNLwNs1OkfKHxFwIDC0wwggAYDzIwMTgwMjEzMDYzMjQ4WqETMBEwDwYJKwYBBQUHMAEJBAIFADANBgkqhkiG9w0BAQsFAAOCAQEAduyhdmJ1pxB6Y9wavgysICD2UjkusDLDNnj2xlNuYHK+c5OVdQ3XKxyUgdIVqNxxudVAmwtuX+vKFk7xjE16A27agZU2KO4llwpAVKrbYsrWMBj3FS/WJzTBk0G+SXKuSgDt5UkwfcZiUxmoMQBntWJTmVon0Ji2VJMALd0HzzEaVp47qqYGYtJX6L5HjvZIC7r/G5C3lEddBgmfNbSPei3EuBVRlLn8LZNLMk+49P7jNMHmlYt3InfSKwEiU18R1WGgQ5yrkyYxyMfhhBrjYZpptT0zs8AuwdAZb7xA4P7rrHgc6IMhQWXmRaKUWoJdOInKt1N59Hyl+mjk36kFQ6CCA84wggPKMIIDxjCCAq6gAwIBAgICHR0wDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCTFUxFjAUBgNVBAoTDUx1eFRydXN0IHMuYS4xHTAbBgNVBAMTFEx1eFRydXN0IEdsb2JhbCBSb290MB4XDTE3MDYyNzEyMzMxNloXDTE4MDYyNzEyMzMxNlowXjELMAkGA1UEBhMCTFUxFjAUBgNVBAoTDUx1eFRydXN0IFMuQS4xEzARBgNVBAsT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new ExternalResourcesOCSPSource(new ByteArrayInputStream(Utils.fromBase64(ocspResponse)));
CertificateToken userUniversign = DSSUtils.loadCertificateFromBase64EncodedString(
"MIIGEzCCBPugAwIBAgIDC0wwMA0GCSqGSIb3DQEBCwUAMEwxCzAJBgNVBAYTAkxVMRYwFAYDVQQKEw1MdXhUcnVzdCBTLkEuMSUwIwYDVQQDExxMdXhUcnVzdCBHbG9iYWwgUXVhbGlmaWVkIENBMB4XDTE0MDYwMzA2MDUxMVoXDTE3MDYwMzA2MDUxMVowggEWMQswCQYDVQQGEwJGUjELMAkGA1UEBxMCTFUxDjAMBgNVBAoTBUlMTkFTMRMwEQYDVQQLEwpMVTIyOTU5NDYzMSwwKgYDVQQDEyNKRUFOLVBISUxJUFBFIFBJRVJSRSBKVUxJRU4gSFVNQkVSVDEQMA4GA1UEBBMHSFVNQkVSVDEkMCIGA1UEKhMbSkVBTi1QSElMSVBQRSBQSUVSUkUgSlVMSUVOMR0wGwYDVQQFExQxMTEwNTg3NTA2MDAzMjIzMjM5MDEyMDAGCSqGSIb3DQEJARYjamVhbi1waGlsaXBwZS5odW1iZXJ0QGlsbmFzLmV0YXQubHUxHDAaBgNVBAwTE1Byb2Zlc3Npb25hbCBQZXJzb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCkJS3Cl5PSHpwyJ2vdiaYFt20+OC+YAToHK9POubXp0o5vt2Cp7scmOaqUb4Qo6wRPgcBQIhvyDN5Loar/JXpfcq533jKbPnFDwRwT4cwfH3aG8bhkjBOWNjKi5PL5K1YRG18EcggoiXsrXTHHUdXtUBII9fPDxMHG2iPGVWMWRPwF0EWE/lmlrXo0V1PFoQiHmv8tRyXnFr45FzwRn1iTbrZP9SQrq76UTZi6HjfgJYQK+Tbu5GrMgLKYMtBE/7BqsgrMnqHtgLTgj00/bLSeoZ0fMEvpEAF0QioKOSd3wn+4WfHPfXzjHVZ0zm1jB+E4LhOyZNvcvleaLeL7sUzfAgMBAAGjggIwMI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KHxFzANBgkqhkiG9w0BAQsFAAOCAQEAGPCWTo1SQy6Kmpwin+GaWVW9h2JO3Qwr6qVwZAQHXPhZGQTD+ghIxN949SGyoMmkGTvJjOSaIs8qJ5lGtDWJuy056rN5FCc2P+0qYofpGdNgSkyRY3xtuKteEPcoi+eFBphY+dlilSPXm3j6Vp/6BRb70Zd35O1Zic95ZUNCxDDVkaDbuN9tjGIBKhnq/ExtpheEdZJPjppVXpsBrCUUpJ0A9oSSFOQewwKSMD/vJKF32M9A2TlRd62XdHeNJrahdU/tO55f9tz3ekl/aKoS2khJxMfBvdvlw2Yc2g02g5rYsBxrSphph6IjqIkALM95jbm9T2Xo2CSROTAtprdhKw==");
OCSPToken ocspToken = ocspSource.getRevocationToken(userUniversign, caUniversign);
ocspToken.extractInfo();
assertNotNull(ocspToken);
assertNull(ocspToken.getArchiveCutOff());
assertNotNull(ocspToken.getThisUpdate());
assertNotNull(ocspToken.getProductionDate());
assertNotNull(ocspToken.getBasicOCSPResp());
assertNotNull(ocspToken.getCertId());
assertNull(ocspToken.getExpiredCertsOnCRL());
assertNull(ocspToken.getCertHash());
assertNotNull(ocspToken.getReason());
}
内容来源于网络,如有侵权,请联系作者删除!