Added SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 support

This commit is contained in:
Lynix
2012-05-10 00:53:36 +02:00
parent d0bc1d908a
commit 68b238fc74
23 changed files with 1621 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
// Copyright (C) 2012 Jérôme Leclercq
// This file is part of the "Nazara Engine".
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_HASH_SHA1_HPP
#define NAZARA_HASH_SHA1_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/HashDigest.hpp>
#include <Nazara/Core/HashImpl.hpp>
union SHA_CTX;
class NAZARA_API NzHashSHA1 : public NzHashImpl
{
public:
NzHashSHA1();
virtual ~NzHashSHA1();
void Append(const nzUInt8* data, unsigned int len);
void Begin();
NzHashDigest End();
static unsigned int GetDigestLength();
static NzString GetHashName();
private:
SHA_CTX* m_state;
};
#endif // NAZARA_HASH_SHA1_HPP