summary refs log tree commit diff
path: root/crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-11-14 01:46:02 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-11-14 01:46:02 +0700
commitc4b9868dd436cb97777c8cb1b66e8715bc6f2700 (patch)
tree3dd0d81d74f72c8fc81fb3b88991fa680a2a053e /crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs
parentBigInteger changed to use uint[] internally (diff)
downloadBouncyCastle.NET-ed25519-c4b9868dd436cb97777c8cb1b66e8715bc6f2700.tar.xz
Remove unnecessary classes
Diffstat (limited to 'crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs')
-rw-r--r--crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs b/crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs
index e18619c18..03afac8e1 100644
--- a/crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs
+++ b/crypto/src/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs
@@ -87,9 +87,11 @@ namespace Org.BouncyCastle.Pkcs
         {
             try
             {
-                ICipherBuilder decryptorBuilder = inputDecryptorProvider.CreateDecryptorBuilder(encryptedPrivateKeyInfo.EncryptionAlgorithm);
+                ICipherBuilder decryptorBuilder = inputDecryptorProvider.CreateDecryptorBuilder(
+                    encryptedPrivateKeyInfo.EncryptionAlgorithm);
 
-                ICipher encIn = decryptorBuilder.BuildCipher(new MemoryInputStream(encryptedPrivateKeyInfo.GetEncryptedData()));
+                ICipher encIn = decryptorBuilder.BuildCipher(
+                    new MemoryStream(encryptedPrivateKeyInfo.GetEncryptedData(), false));
 
                 byte[] data;
                 using (var strm = encIn.Stream)