md5_sha1.h 1.1 KB

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