diff options
Diffstat (limited to 'crypto/src/cms/KeyAgreeRecipientInformation.cs')
-rw-r--r-- | crypto/src/cms/KeyAgreeRecipientInformation.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/src/cms/KeyAgreeRecipientInformation.cs b/crypto/src/cms/KeyAgreeRecipientInformation.cs index cc1823cc6..32679803d 100644 --- a/crypto/src/cms/KeyAgreeRecipientInformation.cs +++ b/crypto/src/cms/KeyAgreeRecipientInformation.cs @@ -104,14 +104,12 @@ namespace Org.BouncyCastle.Cms return GetPublicKeyFromOriginatorID(origID); } - private AsymmetricKeyParameter GetPublicKeyFromOriginatorPublicKey( - AsymmetricKeyParameter receiverPrivateKey, - OriginatorPublicKey originatorPublicKey) + private AsymmetricKeyParameter GetPublicKeyFromOriginatorPublicKey(AsymmetricKeyParameter receiverPrivateKey, + OriginatorPublicKey originatorPublicKey) { PrivateKeyInfo privInfo = PrivateKeyInfoFactory.CreatePrivateKeyInfo(receiverPrivateKey); - SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo( - privInfo.PrivateKeyAlgorithm, - originatorPublicKey.PublicKey.GetBytes()); + SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(privInfo.PrivateKeyAlgorithm, + originatorPublicKey.PublicKey); return PublicKeyFactory.CreateKey(pubInfo); } |