Closed
Conversation
Implement generate_guid_v5() for the Delphi code generator to produce deterministic, stable GUIDs using UUIDv5 (RFC 4122) with SHA-1. Changes: - Add RFC 6234 SHA-1 implementation (header-only, public domain) - Implement UUIDv5 namespace hierarchy (root -> program -> entity) - Add canonical string generation for services and structs - Add guid_v5 (default) and guid_random options - Add comprehensive test suite for UUIDv5, canonical strings, and determinism - Upgraded VC toolset The new implementation: - Generates stable GUIDs across regenerations - Works on all platforms (Windows, Linux, macOS) - Is deterministic (same input = same GUID) - Defaults to UUIDv5 for new code Legacy random GUIDs available via: thrift --gen delphi:guid_random Generated-by: OpenCode big-pickle
… GUID generation - Add SHA-256 implementation from RFC 6234 (same license as SHA-1) - Add uuid8_from_namespace_and_name() function with version bits 0x80 - Replace UUIDv5 usage with UUIDv8 in t_delphi_generator.cc - Keep UUIDv4 (random) as fallback via --gen delphi:guid_v4 - Update tests to verify UUIDv8 format and determinism The UUIDv5 implementation was never released, so this is a direct replacement rather than adding a new version alongside existing code.
The function was copying name bytes into a fixed-size buffer without checking bounds. Added std::min to limit the copy to buffer size. Also fixed similar issue in test file t_uuidv5_rfc4122_tests.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.