cleaned up previous "fix"
@@ -75,7 +75,6 @@ static boolean isGOST(ASN1ObjectIdentifier algorithm)
private Map extraMappings = new HashMap();
private PublicKey publicKey;
private SecureRandom random;
- private AlgorithmParameters algorithmParameters;
public JceAsymmetricKeyWrapper(PublicKey publicKey)
{
@@ -241,12 +240,6 @@ public JceAsymmetricKeyWrapper setAlgorithmMapping(ASN1ObjectIdentifier algorith
Cipher keyEncryptionCipher = helper.createAsymmetricWrapper(getAlgorithmIdentifier().getAlgorithm(), extraMappings);
try
- {
- if (algorithmParameters != null)
- {
- keyEncryptionCipher.init(Cipher.WRAP_MODE, publicKey, algorithmParameters, random);
- }
- else
{
AlgorithmParameters algParams = helper.createAlgorithmParameters(this.getAlgorithmIdentifier());
@@ -258,7 +251,6 @@ public JceAsymmetricKeyWrapper setAlgorithmMapping(ASN1ObjectIdentifier algorith
{
keyEncryptionCipher.init(Cipher.WRAP_MODE, publicKey, random);
}
- }
encryptedKeyBytes = keyEncryptionCipher.wrap(OperatorUtils.getJceKey(encryptionKey));
}
catch (InvalidKeyException e)
