abseil-cpp/absl/random/internal/randen_hwaes.h
Go to the documentation of this file.
1 // Copyright 2017 The Abseil Authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef ABSL_RANDOM_INTERNAL_RANDEN_HWAES_H_
16 #define ABSL_RANDOM_INTERNAL_RANDEN_HWAES_H_
17 
18 #include "absl/base/config.h"
19 
20 // HERMETIC NOTE: The randen_hwaes target must not introduce duplicate
21 // symbols from arbitrary system and other headers, since it may be built
22 // with different flags from other targets, using different levels of
23 // optimization, potentially introducing ODR violations.
24 
25 namespace absl {
27 namespace random_internal {
28 
29 // RANDen = RANDom generator or beetroots in Swiss High German.
30 // 'Strong' (well-distributed, unpredictable, backtracking-resistant) random
31 // generator, faster in some benchmarks than std::mt19937_64 and pcg64_c32.
32 //
33 // RandenHwAes implements the basic state manipulation methods.
34 class RandenHwAes {
35  public:
36  static void Generate(const void* keys, void* state_void);
37  static void Absorb(const void* seed_void, void* state_void);
38  static const void* GetKeys();
39 };
40 
41 // HasRandenHwAesImplementation returns true when there is an accelerated
42 // implementation, and false otherwise. If there is no implementation,
43 // then attempting to use it will abort the program.
45 
46 } // namespace random_internal
48 } // namespace absl
49 
50 #endif // ABSL_RANDOM_INTERNAL_RANDEN_HWAES_H_
keys
const void * keys
Definition: abseil-cpp/absl/random/internal/randen.cc:49
absl::random_internal::HasRandenHwAesImplementation
bool HasRandenHwAesImplementation()
Definition: abseil-cpp/absl/random/internal/randen_hwaes.cc:54
ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_END
Definition: third_party/abseil-cpp/absl/base/config.h:171
ABSL_NAMESPACE_BEGIN
#define ABSL_NAMESPACE_BEGIN
Definition: third_party/abseil-cpp/absl/base/config.h:170
absl::random_internal::RandenHwAes::Absorb
static void Absorb(const void *seed_void, void *state_void)
Definition: abseil-cpp/absl/random/internal/randen_hwaes.cc:66
absl::random_internal::RandenHwAes::Generate
static void Generate(const void *keys, void *state_void)
Definition: abseil-cpp/absl/random/internal/randen_hwaes.cc:74
absl::random_internal::RandenHwAes::GetKeys
static const void * GetKeys()
Definition: abseil-cpp/absl/random/internal/randen_hwaes.cc:57
absl::random_internal::RandenHwAes
Definition: abseil-cpp/absl/random/internal/randen_hwaes.h:34
absl
Definition: abseil-cpp/absl/algorithm/algorithm.h:31


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:50