From a5c1978eefe2fd0dbf1ab6b7cdcb019a9b913a40 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 20 Jul 2014 12:30:58 +0200 Subject: Remove remaining legacy cryptographic algorithms that are never used by VeraCrypt. --- src/Volume/Hash.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/Volume/Hash.cpp') diff --git a/src/Volume/Hash.cpp b/src/Volume/Hash.cpp index ddae669a..b917a8e5 100644 --- a/src/Volume/Hash.cpp +++ b/src/Volume/Hash.cpp @@ -9,7 +9,6 @@ #include "Hash.h" #include "Crypto/Rmd160.h" -#include "Crypto/Sha1.h" #include "Crypto/Sha2.h" #include "Crypto/Whirlpool.h" @@ -22,7 +21,6 @@ namespace VeraCrypt l.push_back (shared_ptr (new Ripemd160 ())); l.push_back (shared_ptr (new Sha512 ())); l.push_back (shared_ptr (new Whirlpool ())); - l.push_back (shared_ptr (new Sha1 ())); return l; } @@ -62,31 +60,6 @@ namespace VeraCrypt if_debug (ValidateDataParameters (data)); RMD160Update ((RMD160_CTX *) Context.Ptr(), data.Get(), (int) data.Size()); } - - // SHA-1 - Sha1::Sha1 () - { - Deprecated = true; - Context.Allocate (sizeof (sha1_ctx)); - Init(); - } - - void Sha1::GetDigest (const BufferPtr &buffer) - { - if_debug (ValidateDigestParameters (buffer)); - sha1_end (buffer, (sha1_ctx *) Context.Ptr()); - } - - void Sha1::Init () - { - sha1_begin ((sha1_ctx *) Context.Ptr()); - } - - void Sha1::ProcessData (const ConstBufferPtr &data) - { - if_debug (ValidateDataParameters (data)); - sha1_hash (data.Get(), (int) data.Size(), (sha1_ctx *) Context.Ptr()); - } // SHA-512 Sha512::Sha512 () -- cgit v1.2.3