diff --git a/api/@ohos.util.d.ets b/api/@ohos.util.d.ets index 72a794baa4a330fc1507e7cfb06dfb8234b6d766..3e534f79ca394a2c7e8d7d9634127fd20d8f488a 100644 --- a/api/@ohos.util.d.ets +++ b/api/@ohos.util.d.ets @@ -1453,5 +1453,30 @@ declare namespace util { * @since 20 */ function getHash(object: object): number; + + /** + * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator. + * + * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. + * @returns { Uint8Array | undefined } Return a Uint8Array representing this UUID, or undefined on failure. + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ + function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array | undefined; + + /** + * Parse a UUID from the string standard representation as described in the RFC 4122 version 4. + * + * @param { string } uuid - String that specifies a UUID + * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails. + * @throws { BusinessError } 10200002 - Invalid uuid string. + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ + function parseUUID(uuid: string): Uint8Array; } export default util;