diff options
author | Jack Lloyd <[email protected]> | 2016-12-11 15:28:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-18 16:48:24 -0500 |
commit | f3cb3edb512bdcab498d825886c3366c341b3f78 (patch) | |
tree | 645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/entropy/cryptoapi_rng | |
parent | c1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff) |
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency,
eg make_u32bit becomes make_uint32. The old typedefs remain for now
since probably lots of application code uses them.
Diffstat (limited to 'src/lib/entropy/cryptoapi_rng')
-rw-r--r-- | src/lib/entropy/cryptoapi_rng/es_capi.cpp | 4 | ||||
-rw-r--r-- | src/lib/entropy/cryptoapi_rng/es_capi.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/entropy/cryptoapi_rng/es_capi.cpp b/src/lib/entropy/cryptoapi_rng/es_capi.cpp index 1624f8946..4695d90ed 100644 --- a/src/lib/entropy/cryptoapi_rng/es_capi.cpp +++ b/src/lib/entropy/cryptoapi_rng/es_capi.cpp @@ -18,7 +18,7 @@ namespace { class CSP_Handle_Impl : public Win32_CAPI_EntropySource::CSP_Handle { public: - explicit CSP_Handle_Impl(u64bit capi_provider) + explicit CSP_Handle_Impl(uint64_t capi_provider) { m_valid = ::CryptAcquireContext(&m_handle, 0, @@ -33,7 +33,7 @@ class CSP_Handle_Impl : public Win32_CAPI_EntropySource::CSP_Handle ::CryptReleaseContext(m_handle, 0); } - size_t gen_random(byte out[], size_t n) const + size_t gen_random(uint8_t out[], size_t n) const { if(m_valid && ::CryptGenRandom(m_handle, static_cast<DWORD>(n), out)) return n; diff --git a/src/lib/entropy/cryptoapi_rng/es_capi.h b/src/lib/entropy/cryptoapi_rng/es_capi.h index 82a779672..79a42828d 100644 --- a/src/lib/entropy/cryptoapi_rng/es_capi.h +++ b/src/lib/entropy/cryptoapi_rng/es_capi.h @@ -32,7 +32,7 @@ class Win32_CAPI_EntropySource final : public Entropy_Source class CSP_Handle { public: - virtual size_t gen_random(byte out[], size_t n) const = 0; + virtual size_t gen_random(uint8_t out[], size_t n) const = 0; }; private: std::vector<std::unique_ptr<CSP_Handle>> m_csp_provs; |