Skip to main content

crypto.randomUUID

Function

Generates a cryptographically secure UUID.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

randomUUID(): string

Generates a cryptographically secure UUID. This method mimics crypto.randomUUID() from the Web Crypto API.

Returns: A securely generated UUID string.

Returns

string