summary refs log tree commit diff
path: root/crypto/src/cms/KEKRecipientInfoGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/cms/KEKRecipientInfoGenerator.cs')
-rw-r--r--crypto/src/cms/KEKRecipientInfoGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/cms/KEKRecipientInfoGenerator.cs b/crypto/src/cms/KEKRecipientInfoGenerator.cs
index d8075d450..2b8524dc6 100644
--- a/crypto/src/cms/KEKRecipientInfoGenerator.cs
+++ b/crypto/src/cms/KEKRecipientInfoGenerator.cs
@@ -78,7 +78,7 @@ namespace Org.BouncyCastle.Cms
 			}
 			else if (Platform.StartsWith(algorithm, "AES"))
 			{
-				int length = key.GetKey().Length * 8;
+				int length = key.KeyLength * 8;
 				DerObjectIdentifier wrapOid;
 
 				if (length == 128)
@@ -107,7 +107,7 @@ namespace Org.BouncyCastle.Cms
 			}
 			else if (Platform.StartsWith(algorithm, "CAMELLIA"))
 			{
-				int length = key.GetKey().Length * 8;
+				int length = key.KeyLength * 8;
 				DerObjectIdentifier wrapOid;
 
 				if (length == 128)