0

Remove pointer-based base::RandBytes and crypto:RandBytes

There are no callers left.

R=dcheng@chromium.org

Bug: 40284755
Change-Id: I42d6ba0acca990fcb7fe6c20f46d0d3bb767d788
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5525872
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299281}
This commit is contained in:
danakj
2024-05-10 16:06:12 +00:00
committed by Chromium LUCI CQ
parent 2c3552dce0
commit b42414ce8c
2 changed files with 0 additions and 11 deletions

@ -91,11 +91,6 @@ BASE_EXPORT float BitsToOpenEndedUnitIntervalF(uint64_t bits);
// crypto::RandBytes instead to ensure the requirement is easily discoverable.
BASE_EXPORT void RandBytes(span<uint8_t> output);
// // TODO(40284755): This overload will be removed, do not use.
inline void RandBytes(void* output, size_t output_length) {
UNSAFE_BUFFERS(span(static_cast<uint8_t*>(output), output_length));
}
// Creates a vector of `length` bytes, fills it with random data, and returns
// it. Thread-safe.
//

@ -17,12 +17,6 @@ namespace crypto {
// Fills `bytes` with cryptographically-secure random bits.
CRYPTO_EXPORT void RandBytes(base::span<uint8_t> bytes);
// TODO(crbug.com/40284755): Deprecated and will be removed, do not use.
inline void RandBytes(void* bytes, size_t len) {
::crypto::RandBytes(
UNSAFE_BUFFERS(base::span(static_cast<uint8_t*>(bytes), len)));
}
// Returns a vector of `length` bytes filled with cryptographically-secure
// random bits.
CRYPTO_EXPORT std::vector<uint8_t> RandBytesAsVector(size_t length);