package core:encoding/uuid/legacy
Overview
package uuid/legacy implements versions 3 and 5 of UUID generation, both of which are using hashing algorithms (MD5 and SHA1, respectively) that are known these days to no longer be secure.
Index
Types (1)
Constants (2)
Variables (0)
This section is empty.
Procedures (4)
Procedure Groups (2)
Types
Identifier ¶
Identifier :: uuid.Identifier
Constants
VARIANT_BYTE_INDEX ¶
VARIANT_BYTE_INDEX :: uuid.VARIANT_BYTE_INDEX
VERSION_BYTE_INDEX ¶
VERSION_BYTE_INDEX :: uuid.VERSION_BYTE_INDEX
Variables
This section is empty.
Procedures
generate_v3_bytes ¶
generate_v3_bytes :: proc(namespace: uuid.Identifier, name: []u8) -> (result: uuid.Identifier) {…}
Generate a version 3 UUID.
This UUID is generated with a MD5 hash of a name and a namespace.
Inputs:
namespace: An Identifier
that is used to represent the underlying namespace.
This can be any one of the Namespace_*
values provided in the uuid
package.
name: The byte slice which will be hashed with the namespace.
Returns:
result: The generated UUID.
generate_v3_string ¶
generate_v3_string :: proc(namespace: uuid.Identifier, name: string) -> (result: uuid.Identifier) {…}
Generate a version 3 UUID.
This UUID is generated with a MD5 hash of a name and a namespace.
Inputs:
namespace: An Identifier
that is used to represent the underlying namespace.
This can be any one of the Namespace_*
values provided in the uuid
package.
name: The string which will be hashed with the namespace.
Returns:
result: The generated UUID.
generate_v5_bytes ¶
generate_v5_bytes :: proc(namespace: uuid.Identifier, name: []u8) -> (result: uuid.Identifier) {…}
Generate a version 5 UUID.
This UUID is generated with a SHA1 hash of a name and a namespace.
Inputs:
namespace: An Identifier
that is used to represent the underlying namespace.
This can be any one of the Namespace_*
values provided in the uuid
package.
name: The byte slice which will be hashed with the namespace.
Returns:
result: The generated UUID.
generate_v5_string ¶
generate_v5_string :: proc(namespace: uuid.Identifier, name: string) -> (result: uuid.Identifier) {…}
Generate a version 5 UUID.
This UUID is generated with a SHA1 hash of a name and a namespace.
Inputs:
namespace: An Identifier
that is used to represent the underlying namespace.
This can be any one of the Namespace_*
values provided in the uuid
package.
name: The string which will be hashed with the namespace.
Returns:
result: The generated UUID.
Procedure Groups
generate_v3 ¶
generate_v3 :: proc{ generate_v3_bytes, generate_v3_string, }
generate_v5 ¶
generate_v5 :: proc{ generate_v5_bytes, generate_v5_string, }
Source Files
Generation Information
Generated with odin version dev-2024-09 (vendor "odin") Windows_amd64 @ 2024-09-07 21:12:27.307249600 +0000 UTC