diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-12-21 12:34:49 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-12-21 12:34:49 +0700 |
commit | 3c508655db514af6702bb51be63dc0b3d176e11b (patch) | |
tree | 2ae0176a5616ecc1b0b30a85a29f2805dc4b5241 /crypto/src/cms/PKCS5Scheme2UTF8PBEKey.cs | |
parent | AesWrap: update from bc-java (diff) | |
download | BouncyCastle.NET-ed25519-3c508655db514af6702bb51be63dc0b3d176e11b.tar.xz |
Span-based alternatives to char[]
Diffstat (limited to '')
-rw-r--r-- | crypto/src/cms/PKCS5Scheme2UTF8PBEKey.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/src/cms/PKCS5Scheme2UTF8PBEKey.cs b/crypto/src/cms/PKCS5Scheme2UTF8PBEKey.cs index e2a09b760..68eff7b44 100644 --- a/crypto/src/cms/PKCS5Scheme2UTF8PBEKey.cs +++ b/crypto/src/cms/PKCS5Scheme2UTF8PBEKey.cs @@ -29,7 +29,19 @@ namespace Org.BouncyCastle.Cms { } - internal override KeyParameter GetEncoded( +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public Pkcs5Scheme2Utf8PbeKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> salt, int iterationCount) + : base(password, salt, iterationCount) + { + } + + public Pkcs5Scheme2Utf8PbeKey(ReadOnlySpan<char> password, AlgorithmIdentifier keyDerivationAlgorithm) + : base(password, keyDerivationAlgorithm) + { + } +#endif + + internal override KeyParameter GetEncoded( string algorithmOid) { Pkcs5S2ParametersGenerator gen = new Pkcs5S2ParametersGenerator(); |