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/prov/openssl/openssl_rc4.cpp | |
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/prov/openssl/openssl_rc4.cpp')
-rw-r--r-- | src/lib/prov/openssl/openssl_rc4.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/prov/openssl/openssl_rc4.cpp b/src/lib/prov/openssl/openssl_rc4.cpp index c8ba32235..9cca7fdd1 100644 --- a/src/lib/prov/openssl/openssl_rc4.cpp +++ b/src/lib/prov/openssl/openssl_rc4.cpp @@ -48,26 +48,26 @@ class OpenSSL_RC4 : public StreamCipher explicit OpenSSL_RC4(size_t skip = 0) : m_skip(skip) { clear(); } ~OpenSSL_RC4() { clear(); } - void set_iv(const byte*, size_t len) override + void set_iv(const uint8_t*, size_t len) override { if(len > 0) throw Exception("RC4 does not support an IV"); } - void seek(u64bit) override + void seek(uint64_t) override { throw Exception("RC4 does not support seeking"); } private: - void cipher(const byte in[], byte out[], size_t length) override + void cipher(const uint8_t in[], uint8_t out[], size_t length) override { ::RC4(&m_rc4, length, in, out); } - void key_schedule(const byte key[], size_t length) override + void key_schedule(const uint8_t key[], size_t length) override { ::RC4_set_key(&m_rc4, length, key); - byte d = 0; + uint8_t d = 0; for(size_t i = 0; i != m_skip; ++i) ::RC4(&m_rc4, 1, &d, &d); } |