diff options
Diffstat (limited to 'src/Volume/Hash.h')
-rw-r--r-- | src/Volume/Hash.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/Volume/Hash.h b/src/Volume/Hash.h index 9cef9de7..5720eb50 100644 --- a/src/Volume/Hash.h +++ b/src/Volume/Hash.h @@ -3,9 +3,9 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2016 IDRIX + and all other portions of this file are Copyright (c) 2013-2017 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -47,30 +47,32 @@ namespace VeraCrypt Hash (const Hash &); Hash &operator= (const Hash &); }; - // RIPEMD-160 - class Ripemd160 : public Hash + #ifndef WOLFCRYPT_BACKEND + // Blake2s + class Blake2s : public Hash { public: - Ripemd160 (); - virtual ~Ripemd160 () { } + Blake2s (); + virtual ~Blake2s () { } virtual void GetDigest (const BufferPtr &buffer); virtual size_t GetBlockSize () const { return 64; } - virtual size_t GetDigestSize () const { return 160 / 8; } - virtual wstring GetName () const { return L"RIPEMD-160"; } - virtual wstring GetAltName () const { return L"RIPEMD160"; } - virtual shared_ptr <Hash> GetNew () const { return shared_ptr <Hash> (new Ripemd160); } + virtual size_t GetDigestSize () const { return 32; } + virtual wstring GetName () const { return L"BLAKE2s-256"; } + virtual wstring GetAltName () const { return L"BLAKE2s"; } + virtual shared_ptr <Hash> GetNew () const { return shared_ptr <Hash> (new Blake2s); } virtual void Init (); virtual void ProcessData (const ConstBufferPtr &data); protected: private: - Ripemd160 (const Ripemd160 &); - Ripemd160 &operator= (const Ripemd160 &); + Blake2s (const Blake2s &); + Blake2s &operator= (const Blake2s &); }; + #endif // SHA-256 class Sha256 : public Hash { @@ -116,8 +118,9 @@ namespace VeraCrypt Sha512 (const Sha512 &); Sha512 &operator= (const Sha512 &); }; + #ifndef WOLFCRYPT_BACKEND // Whirlpool class Whirlpool : public Hash { public: @@ -161,7 +164,8 @@ namespace VeraCrypt private: Streebog (const Streebog &); Streebog &operator= (const Streebog &); }; + #endif } #endif // TC_HEADER_Encryption_Hash |