VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/Hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Volume/Hash.h')
-rw-r--r--src/Volume/Hash.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/Volume/Hash.h b/src/Volume/Hash.h
index c76a6896..5720eb50 100644
--- a/src/Volume/Hash.h
+++ b/src/Volume/Hash.h
@@ -48,28 +48,30 @@ namespace VeraCrypt
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
@@ -117,6 +119,7 @@ namespace VeraCrypt
Sha512 &operator= (const Sha512 &);
};
+ #ifndef WOLFCRYPT_BACKEND
// Whirlpool
class Whirlpool : public Hash
{
@@ -162,6 +165,7 @@ namespace VeraCrypt
Streebog (const Streebog &);
Streebog &operator= (const Streebog &);
};
+ #endif
}
#endif // TC_HEADER_Encryption_Hash