aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-12-19 21:13:33 +0100
committerShauren <shauren.trinity@gmail.com>2023-12-19 21:13:33 +0100
commite172052a0ac0e983a49cc0647fda8df4257dbdcf (patch)
tree16823223ebc0cfdbf8f4c961612148d5c5ea1f83
parent53ac8d3ef5621f7137092b7aeeebf42730059181 (diff)
Core/Crypto: Added SHA 512 definitions
-rw-r--r--src/common/Cryptography/CryptoConstants.h1
-rw-r--r--src/common/Cryptography/CryptoHash.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/common/Cryptography/CryptoConstants.h b/src/common/Cryptography/CryptoConstants.h
index 420e1be4641..60e3fad9dad 100644
--- a/src/common/Cryptography/CryptoConstants.h
+++ b/src/common/Cryptography/CryptoConstants.h
@@ -29,6 +29,7 @@ namespace Crypto
static constexpr size_t MD5_DIGEST_LENGTH_BYTES = 16;
static constexpr size_t SHA1_DIGEST_LENGTH_BYTES = 20;
static constexpr size_t SHA256_DIGEST_LENGTH_BYTES = 32;
+ static constexpr size_t SHA512_DIGEST_LENGTH_BYTES = 64;
};
}
}
diff --git a/src/common/Cryptography/CryptoHash.h b/src/common/Cryptography/CryptoHash.h
index cb7e5716e66..34b299c1d4f 100644
--- a/src/common/Cryptography/CryptoHash.h
+++ b/src/common/Cryptography/CryptoHash.h
@@ -140,6 +140,7 @@ namespace Trinity::Crypto
using MD5 = Trinity::Impl::GenericHash<EVP_md5, Constants::MD5_DIGEST_LENGTH_BYTES>;
using SHA1 = Trinity::Impl::GenericHash<EVP_sha1, Constants::SHA1_DIGEST_LENGTH_BYTES>;
using SHA256 = Trinity::Impl::GenericHash<EVP_sha256, Constants::SHA256_DIGEST_LENGTH_BYTES>;
+ using SHA512 = Trinity::Impl::GenericHash<EVP_sha512, Constants::SHA512_DIGEST_LENGTH_BYTES>;
}
#endif