byte[] oaepParams = getSecurityProperties().getEncryptionKeyTransportOAEPParams(); if (oaepParams != null) { pSource = new PSource.PSpecified(oaepParams);
cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
cipher = new OAEPEncoding(new ElGamalEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.getPSource()).getValue());
byte[] oaepParams = getSecurityProperties().getEncryptionKeyTransportOAEPParams(); if (oaepParams != null) { pSource = new PSource.PSpecified(oaepParams);
byte[] pSourceBytes = EncryptionUtils.getPSource(encryptedKeyElement); if (pSourceBytes != null) { pSource = new PSource.PSpecified(pSourceBytes);
throw new IOException("Error reading ASN.1 encoding"); pSpecified = new PSource.PSpecified( NativeCrypto.asn1_read_octetstring(pSourceSeqRef)); if (!NativeCrypto.asn1_read_is_empty(pSourceSeqRef)) {
throw new IOException("Error reading ASN.1 encoding"); pSpecified = new PSource.PSpecified( NativeCrypto.asn1_read_octetstring(pSourceSeqRef)); if (!NativeCrypto.asn1_read_is_empty(pSourceSeqRef)) {
PSource.PSpecified pSource = (PSource.PSpecified) spec.getPSource(); if (pSource.getValue().length != 0) { long pSourceRef = 0; long pSourceParamsRef = 0; pSourceRef = NativeCrypto.asn1_write_tag(seqRef, 2); pSourceParamsRef = writeAlgorithmIdentifier(pSourceRef, PSPECIFIED_OID); NativeCrypto.asn1_write_octetstring(pSourceParamsRef, pSource.getValue()); } finally { NativeCrypto.asn1_write_flush(seqRef);
PSource.PSpecified pSource = (PSource.PSpecified) spec.getPSource(); if (pSource.getValue().length != 0) { long pSourceRef = 0; long pSourceParamsRef = 0; pSourceRef = NativeCrypto.asn1_write_tag(seqRef, 2); pSourceParamsRef = writeAlgorithmIdentifier(pSourceRef, PSPECIFIED_OID); NativeCrypto.asn1_write_octetstring(pSourceParamsRef, pSource.getValue()); } finally { NativeCrypto.asn1_write_flush(seqRef);
pSource = new PSource.PSpecified(oaepParams);
pSource = new PSource.PSpecified(oaepParams);
return new AlgorithmIdentifier(algorithm, new RSAESOAEPparams(hashAlgorithm, new AlgorithmIdentifier(PKCSObjectIdentifiers.id_mgf1, mgf1HashAlgorithm), new AlgorithmIdentifier(PKCSObjectIdentifiers.id_pSpecified, new DEROctetString(((PSource.PSpecified)pSource).getValue()))));
pSource = new PSource.PSpecified(oaepParams);
@Override protected AlgorithmParameters engineGetParameters() { if (!isInitialized()) { return null; } try { AlgorithmParameters params = AlgorithmParameters.getInstance("OAEP"); final PSource pSrc; if (label == null) { pSrc = PSource.PSpecified.DEFAULT; } else { pSrc = new PSource.PSpecified(label); } params.init(new OAEPParameterSpec( EvpMdRef.getJcaDigestAlgorithmStandardNameFromEVP_MD(oaepMd), EvpMdRef.MGF1_ALGORITHM_NAME, new MGF1ParameterSpec( EvpMdRef.getJcaDigestAlgorithmStandardNameFromEVP_MD(mgf1Md)), pSrc)); return params; } catch (NoSuchAlgorithmException e) { // We should not get here. throw (Error) new AssertionError("OAEP not supported").initCause(e); } catch (InvalidParameterSpecException e) { throw new RuntimeException("No providers of AlgorithmParameters.OAEP available"); } }
return new AlgorithmIdentifier(algorithm, new RSAESOAEPparams(hashAlgorithm, new AlgorithmIdentifier(PKCSObjectIdentifiers.id_mgf1, mgf1HashAlgorithm), new AlgorithmIdentifier(PKCSObjectIdentifiers.id_pSpecified, new DEROctetString(((PSource.PSpecified)pSource).getValue()))));