Core: Reworked hashes
-Removed HashDigest class (replaced by ByteArray) -Removed Hashable/Hash classes (replaced by ComputeHash function and Hashable template struct) -Fixed ByteArray operator<< -Renamed File::GetHash to File::ComputeHash Former-commit-id: cc5eaf2d4c88a556878190b8205e66713512e2d2
This commit is contained in:
@@ -28,23 +28,22 @@ namespace Nz
|
||||
SHA224_Init(m_state);
|
||||
}
|
||||
|
||||
HashDigest HashSHA224::End()
|
||||
ByteArray HashSHA224::End()
|
||||
{
|
||||
UInt8 digest[SHA224_DIGEST_LENGTH];
|
||||
|
||||
SHA224_End(m_state, digest);
|
||||
|
||||
return HashDigest(GetHashName(), digest, SHA224_DIGEST_LENGTH);
|
||||
return ByteArray(digest, SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
unsigned int HashSHA224::GetDigestLength()
|
||||
unsigned int HashSHA224::GetDigestLength() const
|
||||
{
|
||||
return SHA224_DIGEST_LENGTH;
|
||||
}
|
||||
|
||||
String HashSHA224::GetHashName()
|
||||
const char* HashSHA224::GetHashName() const
|
||||
{
|
||||
static String hashName = "SHA224";
|
||||
return hashName;
|
||||
return "SHA224";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user