Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Crypto/Sha1Reg.cpp')
-rw-r--r--CPP/7zip/Crypto/Sha1Reg.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/CPP/7zip/Crypto/Sha1Reg.cpp b/CPP/7zip/Crypto/Sha1Reg.cpp
deleted file mode 100644
index a32972e4..00000000
--- a/CPP/7zip/Crypto/Sha1Reg.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// Sha1Reg.cpp
-
-#include "StdAfx.h"
-
-#include "../../Common/MyCom.h"
-
-#include "../ICoder.h"
-#include "../Common/RegisterCodec.h"
-
-#include "Sha1.h"
-
-using namespace NCrypto;
-using namespace NSha1;
-
-class CSha1Hasher:
- public IHasher,
- public CMyUnknownImp
-{
- CContext _sha;
-public:
- CSha1Hasher() { Init(); }
-
- MY_UNKNOWN_IMP
-
- STDMETHOD_(void, Init)();
- STDMETHOD_(void, Update)(const void *data, UInt32 size);
- STDMETHOD_(void, Final)(Byte *digest);
- STDMETHOD_(UInt32, GetDigestSize)();
-};
-
-STDMETHODIMP_(void) CSha1Hasher::Init()
-{
- _sha.Init();
-}
-
-STDMETHODIMP_(void) CSha1Hasher::Update(const void *data, UInt32 size)
-{
- _sha.Update((const Byte *)data, size);
-}
-
-STDMETHODIMP_(void) CSha1Hasher::Final(Byte *digest)
-{
- _sha.Final(digest);
-}
-
-STDMETHODIMP_(UInt32) CSha1Hasher::GetDigestSize()
-{
- return kDigestSize;
-}
-
-static IHasher *CreateHasher() { return new CSha1Hasher; }
-
-static CHasherInfo g_HasherInfo = { CreateHasher, 0x201, L"SHA1", kDigestSize };
-
-REGISTER_HASHER(Sha1)