Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: crypto/secure_hash.cc

Issue 1909513003: Rename crypto/ *_openssl files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/rsa_private_key_openssl.cc ('k') | crypto/secure_hash_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « crypto/rsa_private_key_openssl.cc ('k') | crypto/secure_hash_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698