diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-28 12:55:26 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-28 12:55:26 +0700 |
commit | 0f951361cae9243b8d1a77d8f4333a602197d50d (patch) | |
tree | c5f2adc22a0b8ef42d5964df49268b73b3371a30 /crypto/src/openssl | |
parent | Generics migration in Cms (diff) | |
download | BouncyCastle.NET-ed25519-0f951361cae9243b8d1a77d8f4333a602197d50d.tar.xz |
Generics migration in Crmf, Crypto, Math
Diffstat (limited to 'crypto/src/openssl')
-rw-r--r-- | crypto/src/openssl/MiscPemGenerator.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/src/openssl/MiscPemGenerator.cs b/crypto/src/openssl/MiscPemGenerator.cs index 3db299569..294cf0afb 100644 --- a/crypto/src/openssl/MiscPemGenerator.cs +++ b/crypto/src/openssl/MiscPemGenerator.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using System.IO; using Org.BouncyCastle.Asn1; @@ -195,11 +195,9 @@ namespace Org.BouncyCastle.OpenSsl byte[] encData = PemUtilities.Crypt(true, keyData, password, dekAlgName, iv); - IList headers = Platform.CreateArrayList(2); - + var headers = new List<PemHeader>(2); headers.Add(new PemHeader("Proc-Type", "4,ENCRYPTED")); - headers.Add(new PemHeader("DEK-Info", dekAlgName + "," - + Strings.ToUpperCase(Hex.ToHexString(iv)))); + headers.Add(new PemHeader("DEK-Info", dekAlgName + "," + Hex.ToHexString(iv).ToUpperInvariant())); return new PemObject(type, headers, encData); } |