Introduce CRYPTO_SHA1_DIGEST_LENGTH and CRYPTO_MD5_DIGEST_LENGTH that hold

number of bytes needed for a given hash.
This commit is contained in:
Pawel Jakub Dawidek 2012-01-19 04:33:38 +01:00
parent d0bfcf1099
commit af5501cdc5
1 changed files with 2 additions and 0 deletions

View File

@ -78,11 +78,13 @@ struct crypto_cert_struct
X509 * px509;
};
#define CRYPTO_SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH
typedef struct crypto_sha1_struct* CryptoSha1;
CryptoSha1 crypto_sha1_init(void);
void crypto_sha1_update(CryptoSha1 sha1, const uint8* data, uint32 length);
void crypto_sha1_final(CryptoSha1 sha1, uint8* out_data);
#define CRYPTO_MD5_DIGEST_LENGTH MD5_DIGEST_LENGTH
typedef struct crypto_md5_struct* CryptoMd5;
CryptoMd5 crypto_md5_init(void);
void crypto_md5_update(CryptoMd5 md5, const uint8* data, uint32 length);