diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-11 18:33:01 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-11 18:33:01 +0700 |
commit | db4e4f5a6ff5348cb6279baa997e361b6c47fcbb (patch) | |
tree | ac84d5387f10063922cdcf273b11d5bd5b7d07ca /crypto/src/openssl | |
parent | Add Memory/Span accessors to avoid some copies (diff) | |
download | BouncyCastle.NET-ed25519-db4e4f5a6ff5348cb6279baa997e361b6c47fcbb.tar.xz |
Reduce allocations in hex encoding
Diffstat (limited to 'crypto/src/openssl')
-rw-r--r-- | crypto/src/openssl/MiscPemGenerator.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/openssl/MiscPemGenerator.cs b/crypto/src/openssl/MiscPemGenerator.cs index cfbb5e96d..75d1e65b3 100644 --- a/crypto/src/openssl/MiscPemGenerator.cs +++ b/crypto/src/openssl/MiscPemGenerator.cs @@ -189,7 +189,7 @@ namespace Org.BouncyCastle.OpenSsl var headers = new List<PemHeader>(2); headers.Add(new PemHeader("Proc-Type", "4,ENCRYPTED")); - headers.Add(new PemHeader("DEK-Info", dekAlgName + "," + Hex.ToHexString(iv).ToUpperInvariant())); + headers.Add(new PemHeader("DEK-Info", dekAlgName + "," + Hex.ToHexString(iv, true))); return new PemObject(type, headers, encData); } @@ -249,7 +249,7 @@ namespace Org.BouncyCastle.OpenSsl var headers = new List<PemHeader>(2); headers.Add(new PemHeader("Proc-Type", "4,ENCRYPTED")); - headers.Add(new PemHeader("DEK-Info", dekAlgName + "," + Hex.ToHexString(iv).ToUpperInvariant())); + headers.Add(new PemHeader("DEK-Info", dekAlgName + "," + Hex.ToHexString(iv, true))); return new PemObject(type, headers, encData); } |