Add static PBKDF2 one-shot methods
authorKevin Jones <kevin@vcsjones.com>
Mon, 22 Feb 2021 20:53:59 +0000 (15:53 -0500)
committerGitHub <noreply@github.com>
Mon, 22 Feb 2021 20:53:59 +0000 (12:53 -0800)
commit0c474714e54421cb6a9149b788ae58db2a2f8fba
tree23fdd012ef40c40f1dd25fea0a352c2910fc67f9
parentd39232c0d17b5125ed61d4c003f612a0c9ae8c1c
Add static PBKDF2 one-shot methods

This avoids the disposable object creation for Rfc2989DeriveBytes and the
state tracking.

Since the one-shots just call into platform routines (when available) it
should allow for higher iteration counts for the same clock time.
28 files changed:
src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Pbkdf2.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.cs
src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptAlgPseudoHandle.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDeriveKeyPBKDF2.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenerateSymmetricKey.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptHash.cs
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptKeyDerivation.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs
src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs
src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/CMakeLists.txt
src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/entrypoints.c
src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/pal_keyderivation.c [new file with mode: 0644]
src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/pal_keyderivation.h [new file with mode: 0644]
src/libraries/Native/Unix/System.Security.Cryptography.Native/entrypoints.c
src/libraries/Native/Unix/System.Security.Cryptography.Native/opensslshim.h
src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_evp.c
src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_evp.h
src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs
src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/HashProviderDispenser.Unix.cs
src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/Pbkdf2Implementation.OSX.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/Pbkdf2Implementation.Unix.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/Pbkdf2Implementation.Windows.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.OneShot.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/Rfc2898OneShotTests.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj