Switch from Nz prefix to namespace Nz
What a huge commit Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
@@ -6,42 +6,45 @@
|
||||
#include <Nazara/Core/Hash/SHA/Internal.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
NzHashSHA224::NzHashSHA224()
|
||||
namespace Nz
|
||||
{
|
||||
m_state = new SHA_CTX;
|
||||
}
|
||||
|
||||
NzHashSHA224::~NzHashSHA224()
|
||||
{
|
||||
delete m_state;
|
||||
}
|
||||
|
||||
void NzHashSHA224::Append(const nzUInt8* data, unsigned int len)
|
||||
{
|
||||
SHA224_Update(m_state, data, len);
|
||||
}
|
||||
|
||||
void NzHashSHA224::Begin()
|
||||
{
|
||||
SHA224_Init(m_state);
|
||||
}
|
||||
|
||||
NzHashDigest NzHashSHA224::End()
|
||||
{
|
||||
nzUInt8 digest[SHA224_DIGEST_LENGTH];
|
||||
|
||||
SHA224_End(m_state, digest);
|
||||
|
||||
return NzHashDigest(GetHashName(), digest, SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
unsigned int NzHashSHA224::GetDigestLength()
|
||||
{
|
||||
return SHA224_DIGEST_LENGTH;
|
||||
}
|
||||
|
||||
NzString NzHashSHA224::GetHashName()
|
||||
{
|
||||
static NzString hashName = "SHA224";
|
||||
return hashName;
|
||||
HashSHA224::HashSHA224()
|
||||
{
|
||||
m_state = new SHA_CTX;
|
||||
}
|
||||
|
||||
HashSHA224::~HashSHA224()
|
||||
{
|
||||
delete m_state;
|
||||
}
|
||||
|
||||
void HashSHA224::Append(const UInt8* data, unsigned int len)
|
||||
{
|
||||
SHA224_Update(m_state, data, len);
|
||||
}
|
||||
|
||||
void HashSHA224::Begin()
|
||||
{
|
||||
SHA224_Init(m_state);
|
||||
}
|
||||
|
||||
HashDigest HashSHA224::End()
|
||||
{
|
||||
UInt8 digest[SHA224_DIGEST_LENGTH];
|
||||
|
||||
SHA224_End(m_state, digest);
|
||||
|
||||
return HashDigest(GetHashName(), digest, SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
unsigned int HashSHA224::GetDigestLength()
|
||||
{
|
||||
return SHA224_DIGEST_LENGTH;
|
||||
}
|
||||
|
||||
String HashSHA224::GetHashName()
|
||||
{
|
||||
static String hashName = "SHA224";
|
||||
return hashName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user