xref: /freebsd/crypto/openssl/providers/implementations/include/prov/md5_sha1.h (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery /*
2*b077aed3SPierre Pronchery  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
3*b077aed3SPierre Pronchery  *
4*b077aed3SPierre Pronchery  * Licensed under the Apache License 2.0 (the "License").  You may not use
5*b077aed3SPierre Pronchery  * this file except in compliance with the License.  You can obtain a copy
6*b077aed3SPierre Pronchery  * in the file LICENSE in the source distribution or at
7*b077aed3SPierre Pronchery  * https://www.openssl.org/source/license.html
8*b077aed3SPierre Pronchery  */
9*b077aed3SPierre Pronchery 
10*b077aed3SPierre Pronchery #ifndef OSSL_PROV_MD5_SHA1_H
11*b077aed3SPierre Pronchery # define OSSL_PROV_MD5_SHA1_H
12*b077aed3SPierre Pronchery 
13*b077aed3SPierre Pronchery # include <openssl/opensslconf.h>
14*b077aed3SPierre Pronchery 
15*b077aed3SPierre Pronchery # ifndef OPENSSL_NO_MD5
16*b077aed3SPierre Pronchery #  include <openssl/e_os2.h>
17*b077aed3SPierre Pronchery #  include <stddef.h>
18*b077aed3SPierre Pronchery #  include <openssl/md5.h>
19*b077aed3SPierre Pronchery #  include <openssl/sha.h>
20*b077aed3SPierre Pronchery 
21*b077aed3SPierre Pronchery #  define MD5_SHA1_DIGEST_LENGTH (MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH)
22*b077aed3SPierre Pronchery #  define MD5_SHA1_CBLOCK MD5_CBLOCK
23*b077aed3SPierre Pronchery 
24*b077aed3SPierre Pronchery typedef struct md5_sha1_st {
25*b077aed3SPierre Pronchery     MD5_CTX md5;
26*b077aed3SPierre Pronchery     SHA_CTX sha1;
27*b077aed3SPierre Pronchery } MD5_SHA1_CTX;
28*b077aed3SPierre Pronchery 
29*b077aed3SPierre Pronchery int ossl_md5_sha1_init(MD5_SHA1_CTX *mctx);
30*b077aed3SPierre Pronchery int ossl_md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count);
31*b077aed3SPierre Pronchery int ossl_md5_sha1_final(unsigned char *md, MD5_SHA1_CTX *mctx);
32*b077aed3SPierre Pronchery int ossl_md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms);
33*b077aed3SPierre Pronchery 
34*b077aed3SPierre Pronchery # endif /* OPENSSL_NO_MD5 */
35*b077aed3SPierre Pronchery 
36*b077aed3SPierre Pronchery #endif /* OSSL_PROV_MD5_SHA1_H */
37