]>
Commit | Line | Data |
---|---|---|
d5e5e2ff SL |
1 | /* |
2 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. | |
3 | * | |
4 | * Licensed under the Apache License 2.0 (the "License"). You may not use | |
5 | * this file except in compliance with the License. You can obtain a copy | |
6 | * in the file LICENSE in the source distribution or at | |
7 | * https://www.openssl.org/source/license.html | |
8 | */ | |
9 | ||
10 | /* TODO(3.0) Move this header into provider when dependencies are removed */ | |
ae4186b0 DMSP |
11 | #ifndef OSSL_INTERNAL_MD5_SHA1_H |
12 | # define OSSL_INTERNAL_MD5_SHA1_H | |
d5e5e2ff SL |
13 | |
14 | # include <openssl/opensslconf.h> | |
15 | ||
16 | # ifndef OPENSSL_NO_MD5 | |
17 | # include <openssl/e_os2.h> | |
18 | # include <stddef.h> | |
19 | # include <openssl/md5.h> | |
20 | # include <openssl/sha.h> | |
21 | ||
22 | # define MD5_SHA1_DIGEST_LENGTH (MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH) | |
23 | # define MD5_SHA1_CBLOCK MD5_CBLOCK | |
24 | ||
25 | typedef struct md5_sha1_st { | |
26 | MD5_CTX md5; | |
27 | SHA_CTX sha1; | |
28 | } MD5_SHA1_CTX; | |
29 | ||
30 | int md5_sha1_init(MD5_SHA1_CTX *mctx); | |
31 | int md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count); | |
32 | int md5_sha1_final(unsigned char *md, MD5_SHA1_CTX *mctx); | |
33 | int md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms); | |
34 | ||
35 | # endif /* OPENSSL_NO_MD5 */ | |
36 | ||
ae4186b0 | 37 | #endif /* OSSL_INTERNAL_MD5_SHA1_H */ |