1/* 2 * Copyright 1995-2021 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#ifndef OSSL_PROV_MD5_SHA1_H 11# define OSSL_PROV_MD5_SHA1_H 12 13# include <openssl/opensslconf.h> 14 15# ifndef OPENSSL_NO_MD5 16# include <openssl/e_os2.h> 17# include <stddef.h> 18# include <openssl/md5.h> 19# include <openssl/sha.h> 20 21# define MD5_SHA1_DIGEST_LENGTH (MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH) 22# define MD5_SHA1_CBLOCK MD5_CBLOCK 23 24typedef struct md5_sha1_st { 25 MD5_CTX md5; 26 SHA_CTX sha1; 27} MD5_SHA1_CTX; 28 29int ossl_md5_sha1_init(MD5_SHA1_CTX *mctx); 30int ossl_md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count); 31int ossl_md5_sha1_final(unsigned char *md, MD5_SHA1_CTX *mctx); 32int ossl_md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms); 33 34# endif /* OPENSSL_NO_MD5 */ 35 36#endif /* OSSL_PROV_MD5_SHA1_H */ 37