Botan 1.10.17
hash_id.h
Go to the documentation of this file.
1/*
2* Hash Function Identification
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_HASHID_H__
9#define BOTAN_HASHID_H__
10
11#include <botan/secmem.h>
12#include <string>
13
14namespace Botan {
15
16/**
17* Return the PKCS #1 hash identifier
18* @see RFC 3447 section 9.2
19* @param hash_name the name of the hash function
20* @return byte sequence identifying the hash
21* @throw Invalid_Argument if the hash has no known PKCS #1 hash id
22*/
23BOTAN_DLL MemoryVector<byte> pkcs_hash_id(const std::string& hash_name);
24
25/**
26* Return the IEEE 1363 hash identifier
27* @param hash_name the name of the hash function
28* @return byte code identifying the hash, or 0 if not known
29*/
30BOTAN_DLL byte ieee1363_hash_id(const std::string& hash_name);
31
32}
33
34#endif
MemoryVector< byte > pkcs_hash_id(const std::string &name)
Definition hash_id.cpp:60
byte ieee1363_hash_id(const std::string &name)
Definition hash_id.cpp:93