Skip to content

RFC-4122 doesn't specify UUID v3 and v5 without a namespace #35

@OSA413

Description

@OSA413

I've just found out that the generation of UUIDs without a namespace are not standard, all other implementations found online and in other programming languages requires providing a namespace and a name.

The specification explicitly says to use a namespace during generation:

"o  Compute the hash of the name space ID concatenated with the name."

Currently your library concatenates an empty array that results in using just the data of the provided name for hashing without any data of the namespace: https://github.com/danakt/uuid-by-string/blob/master/src/index.js#L35

Should you specify in the documentation about library's non-standard function?

Another solution would be using a nil UUID as namespace in cases when user provides no namespace (but that will break current tests that check the generation of UUID without a namespace).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions