Comments (8)
- The UUID generation from name is described in RFC4122, which specifies MD5 or SHA1. I'm not sure the current implementation fully follows the spec, but I think it should be used as the reference and the default.
- If you still want to make the hash algorithm configurable, I would prefer an implementation without virtual functions. They are not required if you follow the templated approach - just define the concept of the hashing function and use the template argument accordingly.
- In order to not break backward compatibility I would suggest implementing the configurable version of
name_generator
under a different name, likebasic_name_generator
or something.name_generator
can be made a typedef to this new implementation.
from uuid.
@Lastique Thank you for your comments.
On item 1, hashes, given SHA1 has recently been compromised, it would make sense to start planning for a replacement. This actually got me thinking as to whether a new IETF document with all the published errata and the addition of another hashing algorithm (or two?) would be warranted.
On item 2, I think it would be an interesting exercise to do what you suggest, and add MD5 as an option. Obviously there will be little to no use of it, but it will complete the implementation with respect to the RFC. I like your strategy in item 3 as well.
from uuid.
I can ask an IETF co-worker of mine about future work on RFC4122 (or a followup RFC).
As a design comment, I agree with @Lastique that having a "hash function" as a template argument rather than using inheritance is a better way to go. [ See the unordered containers for examples. ]
from uuid.
@mclow much appreciated - thank you for taking the time do check on that.
from uuid.
@mclow were you able to make any progress on a RFC4122 follow-up discussion?
from uuid.
I believe that the IETF people are discussing it - but no resolution AFAIK yet.
from uuid.
@mclow I reached out by email to the original authors in RFC 4122 however paulle and rsalz emails bounced.
from uuid.
@mclow my emails to folks on the RFC 4122 bounced. This issue has stalled. Do you have any more contacts or should I think about starting an update of the RFC?
from uuid.
Related Issues (20)
- Memory sanitizer warning on boost::uuids::to_string() call HOT 5
- The MD5 generated by boost-uuid-1.70.0 and boost-uuid-1.71.0 are different HOT 2
- Constructing UUIDs from 2 64 bit integers HOT 7
- Replace boost::mpl with boost::mp11 HOT 6
- Can generator is shared by multiple threads without locks? HOT 2
- Linking to bcrypt creates problems (i.e. for CMake users) HOT 9
- CI: add cmake build jobs (use boost-ci)
- CI: add bigendian test (and coverage report)
- CI: Add coverity scan integration
- Consider removing dependency on Boost.TTI HOT 1
- x86 optimized operators are slower than generic version HOT 2
- Align `uuid` to 16 bytes HOT 7
- time_generator - any opinions about adding it? HOT 12
- #pragma message doesn't show correctly when enabled BOOST_UUID_RANDOM_PROVIDER_SHOW . GCC/Clang HOT 1
- Consider separating the portable header-only random implementation to another package or library HOT 1
- threeway comparision support HOT 4
- basic_random_generator not safe in case a = a HOT 1
- Improve messages of string_generator HOT 1
- [feature request] Please consider supporting UUID v6 v7 v8 as decribed in RFC 9562 HOT 2
- std::data() and std::span support HOT 32
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uuid.