Botan
1.11.15
|
00001 /* 00002 * Hash Function Identification 00003 * (C) 1999-2007 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #ifndef BOTAN_HASHID_H__ 00009 #define BOTAN_HASHID_H__ 00010 00011 #include <botan/secmem.h> 00012 #include <string> 00013 00014 namespace Botan { 00015 00016 /** 00017 * Return the PKCS #1 hash identifier 00018 * @see RFC 3447 section 9.2 00019 * @param hash_name the name of the hash function 00020 * @return byte sequence identifying the hash 00021 * @throw Invalid_Argument if the hash has no known PKCS #1 hash id 00022 */ 00023 BOTAN_DLL std::vector<byte> pkcs_hash_id(const std::string& hash_name); 00024 00025 /** 00026 * Return the IEEE 1363 hash identifier 00027 * @param hash_name the name of the hash function 00028 * @return byte code identifying the hash, or 0 if not known 00029 */ 00030 BOTAN_DLL byte ieee1363_hash_id(const std::string& hash_name); 00031 00032 } 00033 00034 #endif