Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chardoncs committed Oct 24, 2022
1 parent b3c547d commit c157aca
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,42 +123,42 @@ static std::unordered_map<std::string, pgfe_algorithm_choice> pgfe_option_map =

static std::unordered_map<pgfe_algorithm_choice, size_t> pgfe_digest_length = {

{SHA1, PGFE_SHA1_DIGEST_SIZE },
{SHA224, PGFE_SHA224_DIGEST_SIZE },
{SHA256, PGFE_SHA256_DIGEST_SIZE },
{SHA384, PGFE_SHA384_DIGEST_SIZE },
{SHA512, PGFE_SHA512_DIGEST_SIZE },
{SHA512_224, PGFE_SHA512_224_DIGEST_SIZE},
{SHA512_256, PGFE_SHA512_256_DIGEST_SIZE},
{SHA3_224, PGFE_SHA3_224_DIGEST_SIZE },
{SHA3_256, PGFE_SHA3_256_DIGEST_SIZE },
{SHA3_384, PGFE_SHA3_384_DIGEST_SIZE },
{SHA3_512, PGFE_SHA3_512_DIGEST_SIZE },
{MD5, PGFE_MD5_DIGEST_SIZE },
{SHAKE128, 256 },
{RawSHAKE128, 256 },
{SHAKE256, 512 },
{RawSHAKE256, 512 },
{SHA1, PGFE_SHA1_DIGEST_SIZE },
{SHA224, PGFE_SHA224_DIGEST_SIZE },
{SHA256, PGFE_SHA256_DIGEST_SIZE },
{SHA384, PGFE_SHA384_DIGEST_SIZE },
{SHA512, PGFE_SHA512_DIGEST_SIZE },
{SHA512_224, PGFE_SHA512_224_DIGEST_SIZE },
{SHA512_256, PGFE_SHA512_256_DIGEST_SIZE },
{SHA3_224, PGFE_SHA3_224_DIGEST_SIZE },
{SHA3_256, PGFE_SHA3_256_DIGEST_SIZE },
{SHA3_384, PGFE_SHA3_384_DIGEST_SIZE },
{SHA3_512, PGFE_SHA3_512_DIGEST_SIZE },
{MD5, PGFE_MD5_DIGEST_SIZE },
{SHAKE128, PGFE_SHAKE128_DIGEST_SIZE },
{RawSHAKE128, PGFE_RawSHAKE128_DIGEST_SIZE},
{SHAKE256, PGFE_SHAKE256_DIGEST_SIZE },
{RawSHAKE256, PGFE_RawSHAKE256_DIGEST_SIZE},
};

static std::unordered_map<pgfe_algorithm_choice, size_t> pgfe_block_length = {

{SHA1, PGFE_SHA1_BLOCK_SIZE },
{SHA224, PGFE_SHA224_BLOCK_SIZE },
{SHA256, PGFE_SHA256_BLOCK_SIZE },
{SHA384, PGFE_SHA384_BLOCK_SIZE },
{SHA512, PGFE_SHA512_BLOCK_SIZE },
{SHA512_224, PGFE_SHA512_224_BLOCK_SIZE},
{SHA512_256, PGFE_SHA512_256_BLOCK_SIZE},
{SHA3_224, PGFE_SHA3_224_BLOCK_SIZE },
{SHA3_256, PGFE_SHA3_256_BLOCK_SIZE },
{SHA3_384, PGFE_SHA3_384_BLOCK_SIZE },
{SHA3_512, PGFE_SHA3_512_BLOCK_SIZE },
{MD5, PGFE_MD5_BLOCK_SIZE },
{SHAKE128, PGFE_SHAKE128_BLOCK_SIZE },
{RawSHAKE128, PGFE_SHAKE128_BLOCK_SIZE },
{SHAKE256, PGFE_SHAKE256_BLOCK_SIZE },
{RawSHAKE256, PGFE_SHAKE256_BLOCK_SIZE },
{SHA1, PGFE_SHA1_BLOCK_SIZE },
{SHA224, PGFE_SHA224_BLOCK_SIZE },
{SHA256, PGFE_SHA256_BLOCK_SIZE },
{SHA384, PGFE_SHA384_BLOCK_SIZE },
{SHA512, PGFE_SHA512_BLOCK_SIZE },
{SHA512_224, PGFE_SHA512_224_BLOCK_SIZE },
{SHA512_256, PGFE_SHA512_256_BLOCK_SIZE },
{SHA3_224, PGFE_SHA3_224_BLOCK_SIZE },
{SHA3_256, PGFE_SHA3_256_BLOCK_SIZE },
{SHA3_384, PGFE_SHA3_384_BLOCK_SIZE },
{SHA3_512, PGFE_SHA3_512_BLOCK_SIZE },
{MD5, PGFE_MD5_BLOCK_SIZE },
{SHAKE128, PGFE_SHAKE128_BLOCK_SIZE },
{RawSHAKE128, PGFE_RawSHAKE128_BLOCK_SIZE},
{SHAKE256, PGFE_SHAKE256_BLOCK_SIZE },
{RawSHAKE256, PGFE_RawSHAKE256_BLOCK_SIZE},
};

} // namespace PGFE
Expand Down

0 comments on commit c157aca

Please sign in to comment.