Botan  2.13.0
Crypto and TLS for C++11
hash_id.h
Go to the documentation of this file.
1 /*
2 * Hash Function Identification
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_HASHID_H_
9 #define BOTAN_HASHID_H_
10 
11 #include <botan/secmem.h>
12 #include <string>
13 
15 
16 namespace Botan {
17 
18 /**
19 * Return the PKCS #1 hash identifier
20 * @see RFC 3447 section 9.2
21 * @param hash_name the name of the hash function
22 * @return uint8_t sequence identifying the hash
23 * @throw Invalid_Argument if the hash has no known PKCS #1 hash id
24 */
25 BOTAN_PUBLIC_API(2,0) std::vector<uint8_t> pkcs_hash_id(const std::string& hash_name);
26 
27 /**
28 * Return the IEEE 1363 hash identifier
29 * @param hash_name the name of the hash function
30 * @return uint8_t code identifying the hash, or 0 if not known
31 */
32 BOTAN_PUBLIC_API(2,0) uint8_t ieee1363_hash_id(const std::string& hash_name);
33 
34 }
35 
36 #endif
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Definition: bigint.h:1135
uint8_t ieee1363_hash_id(const std::string &name)
Definition: hash_id.cpp:146
Definition: alg_id.cpp:13
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
Definition: compiler.h:139
std::vector< uint8_t > pkcs_hash_id(const std::string &name)
Definition: hash_id.cpp:77