Enable Rfc2898DeriveBytes on Browser WASM (#71768)
authorEric Erhardt <eric.erhardt@microsoft.com>
Sat, 9 Jul 2022 02:51:14 +0000 (20:51 -0600)
committerGitHub <noreply@github.com>
Sat, 9 Jul 2022 02:51:14 +0000 (21:51 -0500)
commit8f75cc9306b0508506f60a94f94d2227ee020798
tree484732c7536978082c09b2a2d8e04acf1d850b30
parent4a38ac3c3f2155218e01336f0fdeefffdece65ef
Enable Rfc2898DeriveBytes on Browser WASM (#71768)

* Enable Rfc2898DeriveBytes on Browser WASM

Marks the APIs as supported on Browser, and enables Rfc2898 tests on Browser WASM.
Use SubtleCrypto deriveBits API to implement one shot Pbkdf2.

* Mark HKDF as supported on Browser and enable tests

Contributes to #40074
24 files changed:
src/libraries/Common/src/Interop/Browser/System.Security.Cryptography.Native.Browser/Interop.SubtleCrypto.cs
src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
src/libraries/Common/src/System/Security/Cryptography/Helpers.cs
src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesSubtleCryptoTransform.Browser.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HKDF.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACHashProvider.Browser.Native.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Pbkdf2Implementation.Browser.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Pbkdf2Implementation.Managed.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHAHashProvider.Browser.Native.cs
src/libraries/System.Security.Cryptography/tests/HKDFTests.cs
src/libraries/System.Security.Cryptography/tests/Rfc2898OneShotTests.cs
src/libraries/System.Security.Cryptography/tests/Rfc2898Tests.cs
src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt
src/mono/wasm/runtime/cjs/dotnet.cjs.lib.js
src/mono/wasm/runtime/crypto-worker.ts
src/mono/wasm/runtime/es6/dotnet.es6.lib.js
src/mono/wasm/runtime/exports.ts
src/mono/wasm/runtime/workers/dotnet-crypto-worker.js
src/native/libs/System.Security.Cryptography.Native.Browser/pal_crypto_webworker.c
src/native/libs/System.Security.Cryptography.Native.Browser/pal_crypto_webworker.h