StaticgetFills a provided Uint8Array with cryptographically secure random values. This method emulates crypto.getRandomValues() from the Web Crypto API.
typedArray A Uint8Array to fill with random values.
Returns: Uint8Array The same array passed in after being filled with random values.
StaticrandomGenerates a cryptographically secure UUID. This method mimics crypto.randomUUID() from the Web Crypto API.
Returns: A securely generated UUID string.
The Crypto class in our system serves a similar purpose to the web standard Crypto module, providing high-quality cryptographic operations crucial for secure application development. It offers methods for generating cryptographically secure UUIDs, random bytes, and SHA hashes. This class is designed to meet the stringent security requirements of applications handling authentication and sensitive transactions, complementing our existing framework by adding enhanced security features for robust and reliable cryptographic functionality.
Example