diff options
-rw-r--r-- | shacal2.cpp | 9 | ||||
-rw-r--r-- | shacal2.h | 1 | ||||
-rw-r--r-- | whrlpool.h | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/shacal2.cpp b/shacal2.cpp index bdaf644e..37ba9899 100644 --- a/shacal2.cpp +++ b/shacal2.cpp @@ -44,6 +44,15 @@ extern void SHACAL2_Enc_ProcessAndXorBlock_SHANI(const word32* subKeys, const byte *inBlock, const byte *xorBlock, byte *outBlock);
#endif
+std::string SHACAL2::Base::AlgorithmProvider() const
+{
+#if CRYPTOPP_SHANI_AVAILABLE
+ if (HasSHA())
+ return "SHANI";
+#endif
+ return "C++";
+}
+
void SHACAL2::Base::UncheckedSetKey(const byte *userKey, unsigned int keylen, const NameValuePairs &)
{
AssertValidKeyLength(keylen);
@@ -28,6 +28,7 @@ class SHACAL2 : public SHACAL2_Info, public BlockCipherDocumentation class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SHACAL2_Info>
{
public:
+ std::string AlgorithmProvider() const;
void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms);
protected:
@@ -29,11 +29,12 @@ NAMESPACE_BEGIN(CryptoPP) class Whirlpool : public IteratedHashWithStaticTransform<word64, BigEndian, 64, 64, Whirlpool>
{
public:
+ CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Whirlpool";}
+ std::string AlgorithmProvider() const;
+
static void InitState(HashWordType *state);
static void Transform(word64 *digest, const word64 *data);
void TruncatedFinal(byte *hash, size_t size);
- CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Whirlpool";}
- std::string AlgorithmProvider() const;
};
NAMESPACE_END
|