Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uuidv5 function to String module #1005

Open
cieslarmichal opened this issue Nov 30, 2024 · 11 comments · May be fixed by #1014
Open

add uuidv5 function to String module #1005

cieslarmichal opened this issue Nov 30, 2024 · 11 comments · May be fixed by #1014
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@cieslarmichal
Copy link
Owner

Version 5: UUIDs based on the SHA1 hash of some data.
Version 6: UUIDs using a timestamp and monotonic counter (sortable).
Version 7: UUIDs using a Unix timestamp (sortable).
Version 8: UUIDs using user-defined data.
@cieslarmichal cieslarmichal added the good first issue Good for newcomers label Nov 30, 2024
@cieslarmichal
Copy link
Owner Author

ref #1004

@kumar80
Copy link

kumar80 commented Dec 6, 2024

for sha1 what library will be better libgcrypt or openssl

@cieslarmichal
Copy link
Owner Author

Well we have some implementations in crypto module but its sha256, we can add sha1 there as well, copy paste from some online resources and add annotation about the source as we cannot use any external libs

@kumar80
Copy link

kumar80 commented Dec 6, 2024

any specific reason why can't we use external libs?

@cieslarmichal
Copy link
Owner Author

Yup, people want to use libs with as little dependencies as possibile

@cieslarmichal
Copy link
Owner Author

Example when i was starting this project I had boost and people were saying cool lib but there is boost deps I wont use it 😁

@kumar80
Copy link

kumar80 commented Dec 7, 2024

for uuidV5 , what's "some data" in "SHA1 hash of some data" ? is it a random data ?
as per this it requires two inputs

@kumar80
Copy link

kumar80 commented Dec 13, 2024

@cieslarmichal

@cieslarmichal
Copy link
Owner Author

uuidv5 function should take two input arguments, one data which user passes like some string and the second is a namespace which is a reference uuid user can also pass but it is optional and we can set it default to "bfd98c8e-48c0-46af-bf44-255d24883f8f"

@kumar80
Copy link

kumar80 commented Dec 14, 2024

Implementation for UUID5 is done. can you please check if anything needs to be changed ?
main...kumar80:faker-cxx:main

@cieslarmichal
Copy link
Owner Author

Could you please raise a pull request, it would be easier to review :)

@cieslarmichal cieslarmichal changed the title add other uuid functions (v5, v6, v7, v8) to String module add uuidv5 function to String module Dec 15, 2024
@cieslarmichal cieslarmichal linked a pull request Dec 15, 2024 that will close this issue
@cieslarmichal cieslarmichal added this to the v4.0.0 milestone Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants