112#if defined(BOTAN_HAS_COMMONCRYPTO)
126#if defined(BOTAN_HAS_SHA1)
127 if(algo_spec ==
"SHA-1") {
128 return std::make_unique<SHA_1>();
132#if defined(BOTAN_HAS_SHA2_32)
133 if(algo_spec ==
"SHA-224") {
134 return std::make_unique<SHA_224>();
137 if(algo_spec ==
"SHA-256") {
138 return std::make_unique<SHA_256>();
142#if defined(BOTAN_HAS_SHA2_64)
143 if(algo_spec ==
"SHA-384") {
144 return std::make_unique<SHA_384>();
147 if(algo_spec ==
"SHA-512") {
148 return std::make_unique<SHA_512>();
151 if(algo_spec ==
"SHA-512-256") {
152 return std::make_unique<SHA_512_256>();
156#if defined(BOTAN_HAS_RIPEMD_160)
157 if(algo_spec ==
"RIPEMD-160") {
158 return std::make_unique<RIPEMD_160>();
162#if defined(BOTAN_HAS_WHIRLPOOL)
163 if(algo_spec ==
"Whirlpool") {
164 return std::make_unique<Whirlpool>();
168#if defined(BOTAN_HAS_MD5)
169 if(algo_spec ==
"MD5") {
170 return std::make_unique<MD5>();
174#if defined(BOTAN_HAS_MD4)
175 if(algo_spec ==
"MD4") {
176 return std::make_unique<MD4>();
180#if defined(BOTAN_HAS_GOST_34_11)
181 if(algo_spec ==
"GOST-R-34.11-94" || algo_spec ==
"GOST-34.11") {
182 return std::make_unique<GOST_34_11>();
186#if defined(BOTAN_HAS_ADLER32)
187 if(algo_spec ==
"Adler32") {
188 return std::make_unique<Adler32>();
192#if defined(BOTAN_HAS_ASCON_HASH256)
193 if(algo_spec ==
"Ascon-Hash256") {
194 return std::make_unique<Ascon_Hash256>();
198#if defined(BOTAN_HAS_CRC24)
199 if(algo_spec ==
"CRC24") {
200 return std::make_unique<CRC24>();
204#if defined(BOTAN_HAS_CRC32)
205 if(algo_spec ==
"CRC32") {
206 return std::make_unique<CRC32>();
210#if defined(BOTAN_HAS_STREEBOG)
211 if(algo_spec ==
"Streebog-256") {
212 return std::make_unique<Streebog>(256);
214 if(algo_spec ==
"Streebog-512") {
215 return std::make_unique<Streebog>(512);
219#if defined(BOTAN_HAS_SM3)
220 if(algo_spec ==
"SM3") {
221 return std::make_unique<SM3>();
227#if defined(BOTAN_HAS_SKEIN_512)
233#if defined(BOTAN_HAS_BLAKE2B)
239#if defined(BOTAN_HAS_BLAKE2S)
245#if defined(BOTAN_HAS_KECCAK)
251#if defined(BOTAN_HAS_SHA3)
257#if defined(BOTAN_HAS_SHAKE)
266#if defined(BOTAN_HAS_PARALLEL_HASH)
268 std::vector<std::unique_ptr<HashFunction>> hashes;
270 for(
size_t i = 0; i != req.
arg_count(); ++i) {
275 hashes.push_back(std::move(h));
278 return std::make_unique<Parallel>(hashes);
282#if defined(BOTAN_HAS_TRUNCATED_HASH)
289 return std::make_unique<Truncated_Hash>(std::move(hash), req.
arg_as_integer(1));
293#if defined(BOTAN_HAS_COMB4P)
299 return std::make_unique<Comb4P>(std::move(h1), std::move(h2));