LensStudio:Crypto
ModuleCryptography module providing secure random value generation, UUIDs, and digest operations modeled after the Web Crypto API.
Example
const Crypto = await import('LensStudio:Crypto');
const buffer = new Uint8Array(16);
Crypto.getRandomValues(buffer);
const id = Crypto.randomUUID();
console.log(`UUID=${id} randomByte0=${buffer[0]}`);
Classes
| Class | Description |
|---|---|
| subtle | Lower-level cryptographic primitives mirroring the Web Crypto SubtleCrypto interface. |
Functions
| Function | Description |
|---|---|
| getRandomValues | Fills the given typed array with cryptographically strong random values and returns it. |
| randomUUID | Generates a cryptographically random version 4 UUID string. |