mgf1: Refactored MGF1 as an XOF

This commit is contained in:
Andreas Steffen
2016-09-21 06:40:52 +02:00
parent e9e643b240
commit 188b190a70
60 changed files with 966 additions and 644 deletions
@@ -46,6 +46,11 @@ struct private_sha3_shake_t {
};
METHOD(xof_t, get_type, ext_out_function_t,
private_sha3_shake_t *this)
{
return this->algorithm;
}
METHOD(xof_t, get_bytes, bool,
private_sha3_shake_t *this, size_t out_len, uint8_t *buffer)
@@ -114,6 +119,7 @@ sha3_shake_t* sha3_shake_create(ext_out_function_t algorithm)
INIT(this,
.public = {
.xof_interface = {
.get_type = _get_type,
.get_bytes = _get_bytes,
.allocate_bytes = _allocate_bytes,
.get_block_size = _get_block_size,