Index: crypto/secure_hash.cc |
diff --git a/crypto/secure_hash_openssl.cc b/crypto/secure_hash.cc |
similarity index 81% |
rename from crypto/secure_hash_openssl.cc |
rename to crypto/secure_hash.cc |
index 868300f0f78e11e106b7af54c869b91e62bf86cd..2a5a1f02089e6f1ddd24523ab6f39fd31bea744a 100644 |
--- a/crypto/secure_hash_openssl.cc |
+++ b/crypto/secure_hash.cc |
@@ -16,17 +16,17 @@ namespace crypto { |
namespace { |
-class SecureHashSHA256OpenSSL : public SecureHash { |
+class SecureHashSHA256 : public SecureHash { |
public: |
- SecureHashSHA256OpenSSL() { |
+ SecureHashSHA256() { |
SHA256_Init(&ctx_); |
} |
- SecureHashSHA256OpenSSL(const SecureHashSHA256OpenSSL& other) { |
+ SecureHashSHA256(const SecureHashSHA256& other) { |
memcpy(&ctx_, &other.ctx_, sizeof(ctx_)); |
} |
- ~SecureHashSHA256OpenSSL() override { |
+ ~SecureHashSHA256() override { |
OPENSSL_cleanse(&ctx_, sizeof(ctx_)); |
} |
@@ -41,7 +41,7 @@ class SecureHashSHA256OpenSSL : public SecureHash { |
} |
SecureHash* Clone() const override { |
- return new SecureHashSHA256OpenSSL(*this); |
+ return new SecureHashSHA256(*this); |
} |
size_t GetHashLength() const override { return SHA256_DIGEST_LENGTH; } |
@@ -55,7 +55,7 @@ class SecureHashSHA256OpenSSL : public SecureHash { |
SecureHash* SecureHash::Create(Algorithm algorithm) { |
switch (algorithm) { |
case SHA256: |
- return new SecureHashSHA256OpenSSL(); |
+ return new SecureHashSHA256(); |
default: |
NOTIMPLEMENTED(); |
return NULL; |