You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

11 lines
341 B

import { getWebCrypto } from './getWebCrypto.js';
/**
* Fill up the provided bytes array with random bytes equal to its length.
*
* @returns the same bytes array passed into the method
*/
export async function getRandomValues(array) {
const WebCrypto = await getWebCrypto();
WebCrypto.getRandomValues(array);
return array;
}