};
-struct SHA2_256Constants
+struct SHA256Constants
{
typedef UInt32 WordType;
WORD_SIZE = sizeof(WordType),
BLOCK_SIZE = 64, // 512 bits
DIGEST_SIZE = 32, // 256 bits
+ MIN_PADDING = 8,
N_ROUNDS = 64
};
static const unsigned sigma_constants[12];
};
-struct SHA2_512Constants
+struct SHA512Constants
{
typedef UInt64 WordType;
WORD_SIZE = sizeof(WordType),
BLOCK_SIZE = 128, // 1024 bits
DIGEST_SIZE = 64, // 512 bits
+ MIN_PADDING = 16,
N_ROUNDS = 80
};
static const unsigned sigma_constants[12];
};
-typedef SHA2<SHA2_256Constants> SHA256;
-typedef SHA2<SHA2_512Constants> SHA512;
+typedef SHA2<SHA256Constants> SHA256;
+typedef SHA2<SHA512Constants> SHA512;
} // namespace Crypto
} // namespace Msp