refactor(rng): Deprecate random_vec(span) in favor of randomize()#5495
Open
KaganCanSit wants to merge 1 commit into
Open
refactor(rng): Deprecate random_vec(span) in favor of randomize()#5495KaganCanSit wants to merge 1 commit into
KaganCanSit wants to merge 1 commit into
Conversation
KaganCanSit
force-pushed
the
refactor/rng-depracate-random-vec-span
branch
from
March 29, 2026 17:28
bb3b84c to
cd69ad6
Compare
KaganCanSit
force-pushed
the
refactor/rng-depracate-random-vec-span
branch
from
May 6, 2026 18:03
cd69ad6 to
28b865b
Compare
Replace internal random_vec(span) calls with randomize() across the codebase. Mark the overload as deprecated.
KaganCanSit
force-pushed
the
refactor/rng-depracate-random-vec-span
branch
from
May 24, 2026 08:27
28b865b to
1d9f2aa
Compare
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.
The
random_vec(std::span<uint8_t>)overload marked with thetodomessage is functionally identical torandomize(std::span<uint8_t>). It does not perform any resizing or allocation operations.In this regard:
random_vecfunction marked as deprecated.todomessage updated for its removal in Botan4.random_vec(std::span<uint8_t>)torandomize().Notes
random_vec(T& v, size_t bytes)andT random_vec(size_t bytes)overloads are retained — they provide resize/allocate semantics that have no equivalent inrandomize().Notes 2
The
@deprecatedDoxygen tag was considered but omitted — it is not used elsewhere in the project and triggers-Wdocumentation-deprecated-syncwarnings across all translation units that include this header.Updates:
06.05.2026 - Rebase master for
src/tests/test_strong_type.cppconflict.24.05.2026 - Rebase master branch.