diff options
author | lloyd <[email protected]> | 2013-04-19 14:56:02 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-04-19 14:56:02 +0000 |
commit | abbf2b764c6fd2339c9e4fbc4647072087683f48 (patch) | |
tree | 21495af9492a03a0707343b3a0d8ade830c0699e /src/engine | |
parent | d6d870741bb2272b564153b26a638fb6e29ddd89 (diff) |
Rename ARC4 to RC4
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/core_engine/lookup_stream.cpp | 12 | ||||
-rw-r--r-- | src/engine/openssl/ossl_arc4.cpp | 32 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/engine/core_engine/lookup_stream.cpp b/src/engine/core_engine/lookup_stream.cpp index 683ee6b8c..b26bbedcd 100644 --- a/src/engine/core_engine/lookup_stream.cpp +++ b/src/engine/core_engine/lookup_stream.cpp @@ -8,8 +8,8 @@ #include <botan/internal/core_engine.h> #include <botan/scan_name.h> -#if defined(BOTAN_HAS_ARC4) - #include <botan/arc4.h> +#if defined(BOTAN_HAS_RC4) + #include <botan/rc4.h> #endif #if defined(BOTAN_HAS_SALSA20) @@ -25,11 +25,11 @@ StreamCipher* Core_Engine::find_stream_cipher(const SCAN_Name& request, Algorithm_Factory&) const { -#if defined(BOTAN_HAS_ARC4) - if(request.algo_name() == "ARC4") - return new ARC4(request.arg_as_integer(0, 0)); +#if defined(BOTAN_HAS_RC4) + if(request.algo_name() == "RC4") + return new RC4(request.arg_as_integer(0, 0)); if(request.algo_name() == "RC4_drop") - return new ARC4(768); + return new RC4(768); #endif #if defined(BOTAN_HAS_SALSA20) diff --git a/src/engine/openssl/ossl_arc4.cpp b/src/engine/openssl/ossl_arc4.cpp index cad194a59..0eb404af1 100644 --- a/src/engine/openssl/ossl_arc4.cpp +++ b/src/engine/openssl/ossl_arc4.cpp @@ -1,5 +1,5 @@ /* -* OpenSSL ARC4 +* OpenSSL RC4 * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license @@ -14,15 +14,15 @@ namespace Botan { namespace { /** -* ARC4 as implemented by OpenSSL +* RC4 as implemented by OpenSSL */ -class ARC4_OpenSSL : public StreamCipher +class RC4_OpenSSL : public StreamCipher { public: void clear() { clear_mem(&state, 1); } std::string name() const; - StreamCipher* clone() const { return new ARC4_OpenSSL(SKIP); } + StreamCipher* clone() const { return new RC4_OpenSSL(SKIP); } Key_Length_Specification key_spec() const { @@ -30,8 +30,8 @@ class ARC4_OpenSSL : public StreamCipher } - ARC4_OpenSSL(size_t s = 0) : SKIP(s) { clear(); } - ~ARC4_OpenSSL() { clear(); } + RC4_OpenSSL(size_t s = 0) : SKIP(s) { clear(); } + ~RC4_OpenSSL() { clear(); } private: void cipher(const byte[], byte[], size_t); void key_schedule(const byte[], size_t); @@ -43,17 +43,17 @@ class ARC4_OpenSSL : public StreamCipher /* * Return the name of this type */ -std::string ARC4_OpenSSL::name() const +std::string RC4_OpenSSL::name() const { - if(SKIP == 0) return "ARC4"; + if(SKIP == 0) return "RC4"; if(SKIP == 256) return "MARK-4"; else return "RC4_skip(" + std::to_string(SKIP) + ")"; } /* -* ARC4 Key Schedule +* RC4 Key Schedule */ -void ARC4_OpenSSL::key_schedule(const byte key[], size_t length) +void RC4_OpenSSL::key_schedule(const byte key[], size_t length) { RC4_set_key(&state, length, key); byte dummy = 0; @@ -62,9 +62,9 @@ void ARC4_OpenSSL::key_schedule(const byte key[], size_t length) } /* -* ARC4 Encryption +* RC4 Encryption */ -void ARC4_OpenSSL::cipher(const byte in[], byte out[], size_t length) +void RC4_OpenSSL::cipher(const byte in[], byte out[], size_t length) { RC4(&state, length, in, out); } @@ -72,16 +72,16 @@ void ARC4_OpenSSL::cipher(const byte in[], byte out[], size_t length) } /** -* Look for an OpenSSL-supported stream cipher (ARC4) +* Look for an OpenSSL-supported stream cipher (RC4) */ StreamCipher* OpenSSL_Engine::find_stream_cipher(const SCAN_Name& request, Algorithm_Factory&) const { - if(request.algo_name() == "ARC4") - return new ARC4_OpenSSL(request.arg_as_integer(0, 0)); + if(request.algo_name() == "RC4") + return new RC4_OpenSSL(request.arg_as_integer(0, 0)); if(request.algo_name() == "RC4_drop") - return new ARC4_OpenSSL(768); + return new RC4_OpenSSL(768); return 0; } |