jpayne@69: /* jpayne@69: * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. jpayne@69: * jpayne@69: * Licensed under the OpenSSL license (the "License"). You may not use jpayne@69: * this file except in compliance with the License. You can obtain a copy jpayne@69: * in the file LICENSE in the source distribution or at jpayne@69: * https://www.openssl.org/source/license.html jpayne@69: */ jpayne@69: jpayne@69: #ifndef HEADER_MD5_H jpayne@69: # define HEADER_MD5_H jpayne@69: jpayne@69: # include jpayne@69: jpayne@69: # ifndef OPENSSL_NO_MD5 jpayne@69: # include jpayne@69: # include jpayne@69: # ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: # endif jpayne@69: jpayne@69: /* jpayne@69: * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! jpayne@69: * ! MD5_LONG has to be at least 32 bits wide. ! jpayne@69: * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! jpayne@69: */ jpayne@69: # define MD5_LONG unsigned int jpayne@69: jpayne@69: # define MD5_CBLOCK 64 jpayne@69: # define MD5_LBLOCK (MD5_CBLOCK/4) jpayne@69: # define MD5_DIGEST_LENGTH 16 jpayne@69: jpayne@69: typedef struct MD5state_st { jpayne@69: MD5_LONG A, B, C, D; jpayne@69: MD5_LONG Nl, Nh; jpayne@69: MD5_LONG data[MD5_LBLOCK]; jpayne@69: unsigned int num; jpayne@69: } MD5_CTX; jpayne@69: jpayne@69: int MD5_Init(MD5_CTX *c); jpayne@69: int MD5_Update(MD5_CTX *c, const void *data, size_t len); jpayne@69: int MD5_Final(unsigned char *md, MD5_CTX *c); jpayne@69: unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); jpayne@69: void MD5_Transform(MD5_CTX *c, const unsigned char *b); jpayne@69: # ifdef __cplusplus jpayne@69: } jpayne@69: # endif jpayne@69: # endif jpayne@69: jpayne@69: #endif