UUID

The UUID class provides methods to make working with UUIDs easier and consistent across all Payvo SDK products.

Importing the UUID class

1import { UUID } from "@payvo/sdk-cryptography";

Generate a UUID based on the current time

1UUID.timestamp();

Generate a MD5 UUID based on a name and namespace

1UUID.md5('name', 'namespace');

Generate a UUID based on a random value

1UUID.random();

Generate a SHA1 UUID based on a name and namespace

1UUID.sha1('name', 'namespace');

Generate a UUID based on a parse value

1UUID.parse('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');

Convert a buffer into a UUID

1UUID.stringify(UUID.parse('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'));

Validate a UUID

1UUID.validate('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');
Last updated 4 months ago
Edit Page
Share:
2022 © ARK.io | All Rights Reserved
An ARK.io Product