Skip to content

Commit

Permalink
Clarify some uuid legacy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Feoramund committed Jun 22, 2024
1 parent 5a75cac commit 4481f9c
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions core/encoding/uuid/legacy/legacy.odin
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ VARIANT_BYTE_INDEX :: uuid.VARIANT_BYTE_INDEX
/*
Generate a version 3 UUID.
This UUID is generated from a name within a namespace.
MD5 is used to hash the name with the namespace to produce the UUID.
This UUID is generated with a MD5 hash of a name and a namespace.
Inputs:
- namespace: Another `Identifier` that is used to represent the underlying namespace.
- 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 used to generate the name on top of the namespace.
- name: The byte slice which will be hashed with the namespace.
Returns:
- result: The generated UUID.
Expand Down Expand Up @@ -55,13 +54,12 @@ generate_v3_bytes :: proc(
/*
Generate a version 3 UUID.
This UUID is generated from a name within a namespace.
MD5 is used to hash the name with the namespace to produce the UUID.
This UUID is generated with a MD5 hash of a name and a namespace.
Inputs:
- namespace: Another `Identifier` that is used to represent the underlying namespace.
- 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 used to generate the name on top of the namespace.
- name: The string which will be hashed with the namespace.
Returns:
- result: The generated UUID.
Expand All @@ -83,13 +81,12 @@ generate_v3 :: proc {
/*
Generate a version 5 UUID.
This UUID is generated from a name within a namespace.
SHA1 is used to hash the name with the namespace to produce the UUID.
This UUID is generated with a SHA1 hash of a name and a namespace.
Inputs:
- namespace: Another `Identifier` that is used to represent the underlying namespace.
- 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 used to generate the name on top of the namespace.
- name: The byte slice which will be hashed with the namespace.
Returns:
- result: The generated UUID.
Expand Down Expand Up @@ -123,13 +120,12 @@ generate_v5_bytes :: proc(
/*
Generate a version 5 UUID.
This UUID is generated from a name within a namespace.
SHA1 is used to hash the name with the namespace to produce the UUID.
This UUID is generated with a SHA1 hash of a name and a namespace.
Inputs:
- namespace: Another `Identifier` that is used to represent the underlying namespace.
- 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 used to generate the name on top of the namespace.
- name: The string which will be hashed with the namespace.
Returns:
- result: The generated UUID.
Expand Down

0 comments on commit 4481f9c

Please sign in to comment.