aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/bc/BcKeyTransRecipient.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/bc/BcKeyTransRecipient.java')
-rw-r--r--libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/bc/BcKeyTransRecipient.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/bc/BcKeyTransRecipient.java b/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/bc/BcKeyTransRecipient.java
deleted file mode 100644
index ab50269d7..000000000
--- a/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/bc/BcKeyTransRecipient.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.spongycastle.cms.bc;
-
-import org.spongycastle.asn1.x509.AlgorithmIdentifier;
-import org.spongycastle.cms.CMSException;
-import org.spongycastle.cms.KeyTransRecipient;
-import org.spongycastle.crypto.CipherParameters;
-import org.spongycastle.crypto.params.AsymmetricKeyParameter;
-import org.spongycastle.operator.AsymmetricKeyUnwrapper;
-import org.spongycastle.operator.OperatorException;
-import org.spongycastle.operator.bc.BcRSAAsymmetricKeyUnwrapper;
-
-public abstract class BcKeyTransRecipient
- implements KeyTransRecipient
-{
- private AsymmetricKeyParameter recipientKey;
-
- public BcKeyTransRecipient(AsymmetricKeyParameter recipientKey)
- {
- this.recipientKey = recipientKey;
- }
-
- protected CipherParameters extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm, AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedEncryptionKey)
- throws CMSException
- {
- AsymmetricKeyUnwrapper unwrapper = new BcRSAAsymmetricKeyUnwrapper(keyEncryptionAlgorithm, recipientKey);
-
- try
- {
- return CMSUtils.getBcKey(unwrapper.generateUnwrappedKey(encryptedKeyAlgorithm, encryptedEncryptionKey));
- }
- catch (OperatorException e)
- {
- throw new CMSException("exception unwrapping key: " + e.getMessage(), e);
- }
- }
-}