1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(ext/node): add crypto.getRandomValues (#23028)

Alias for `crypto.webcrypto.getRandomValues`
This commit is contained in:
Divy Srivastava 2024-03-22 18:56:20 +05:30 committed by GitHub
parent f96f167dc8
commit eb9d473974
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -164,6 +164,10 @@ import { crypto as webcrypto } from "ext:deno_crypto/00_crypto.js";
const fipsForced = getOptionValue("--force-fips");
function getRandomValues(typedArray) {
return webcrypto.getRandomValues(typedArray);
}
function createCipheriv(
algorithm: CipherCCMTypes,
key: CipherKey,
@ -332,6 +336,7 @@ export default {
diffieHellman,
DiffieHellmanGroup,
ECDH,
getRandomValues,
generateKey,
generateKeyPair,
generateKeyPairSync,
@ -480,6 +485,7 @@ export {
getDiffieHellman,
getFips,
getHashes,
getRandomValues,
Hash,
hkdf,
hkdfSync,