mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-26 19:30:21 +00:00
Add SHACAL2 cipher AlgorithmProvider()
This commit is contained in:
parent
1f5d0d85cf
commit
3929c3594c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user