alg_st.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _ALG_ST_H
00020 #define _ALG_ST_H
00021
00022 #ifdef HAVE_CONFIG_H
00023 #include <config.h>
00024 #endif
00025
00026
00027 #ifdef HAVE_NSS
00028 #include <secoid.h>
00029 #include <sechash.h>
00030 typedef SECHashObject ALGDIGEST;
00031 #define ALGORITHM_SHA512 SEC_OID_SHA512
00032 #define ALGORITHM_SHA384 SEC_OID_SHA385
00033 #define ALGORITHM_SHA256 SEC_OID_SHA256
00034 #define ALGORITHM_SHA1 SEC_OID_SHA1
00035 #define ALGORITHM_MD5 SEC_OID_MD5
00036 #define ALGORITHM_MD2 SEC_OID_MD2
00037 #else
00038 #include <openssl/evp.h>
00039 typedef EVP_MD ALGDIGEST;
00040 #define ALGORITHM_SHA512 "sha512"
00041 #define ALGORITHM_SHA384 "sha384"
00042 #define ALGORITHM_SHA256 "sha256"
00043 #define ALGORITHM_SHA1 "sha1"
00044 #define ALGORITHM_MD5 "md5"
00045 #define ALGORITHM_MD2 "md2"
00046 #endif
00047
00048 ALGORITHM_TYPE Alg_get_alg_from_string(const char *);
00049
00050 const ALGDIGEST *Alg_get_digest_by_name(ALGORITHM_TYPE hash);
00051
00052 #endif