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_MDC2_H jpayne@69: # define HEADER_MDC2_H jpayne@69: jpayne@69: # include jpayne@69: jpayne@69: #ifndef OPENSSL_NO_MDC2 jpayne@69: # include jpayne@69: # include jpayne@69: # ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: # endif jpayne@69: jpayne@69: # define MDC2_BLOCK 8 jpayne@69: # define MDC2_DIGEST_LENGTH 16 jpayne@69: jpayne@69: typedef struct mdc2_ctx_st { jpayne@69: unsigned int num; jpayne@69: unsigned char data[MDC2_BLOCK]; jpayne@69: DES_cblock h, hh; jpayne@69: int pad_type; /* either 1 or 2, default 1 */ jpayne@69: } MDC2_CTX; jpayne@69: jpayne@69: int MDC2_Init(MDC2_CTX *c); jpayne@69: int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); jpayne@69: int MDC2_Final(unsigned char *md, MDC2_CTX *c); jpayne@69: unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); jpayne@69: jpayne@69: # ifdef __cplusplus jpayne@69: } jpayne@69: # endif jpayne@69: # endif jpayne@69: jpayne@69: #endif