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_RIPEMD_H jpayne@69: # define HEADER_RIPEMD_H jpayne@69: jpayne@69: # include jpayne@69: jpayne@69: #ifndef OPENSSL_NO_RMD160 jpayne@69: # include jpayne@69: # include jpayne@69: # ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: # endif jpayne@69: jpayne@69: # define RIPEMD160_LONG unsigned int jpayne@69: jpayne@69: # define RIPEMD160_CBLOCK 64 jpayne@69: # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) jpayne@69: # define RIPEMD160_DIGEST_LENGTH 20 jpayne@69: jpayne@69: typedef struct RIPEMD160state_st { jpayne@69: RIPEMD160_LONG A, B, C, D, E; jpayne@69: RIPEMD160_LONG Nl, Nh; jpayne@69: RIPEMD160_LONG data[RIPEMD160_LBLOCK]; jpayne@69: unsigned int num; jpayne@69: } RIPEMD160_CTX; jpayne@69: jpayne@69: int RIPEMD160_Init(RIPEMD160_CTX *c); jpayne@69: int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); jpayne@69: int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); jpayne@69: unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); jpayne@69: void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); jpayne@69: jpayne@69: # ifdef __cplusplus jpayne@69: } jpayne@69: # endif jpayne@69: # endif jpayne@69: jpayne@69: jpayne@69: #endif