1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3e1051a39Sopenharmony_ci * 4e1051a39Sopenharmony_ci * Licensed under the OpenSSL license (the "License"). You may not use 5e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 6e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 7e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 8e1051a39Sopenharmony_ci */ 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ci#ifndef HEADER_MD4_H 11e1051a39Sopenharmony_ci# define HEADER_MD4_H 12e1051a39Sopenharmony_ci 13e1051a39Sopenharmony_ci# include <openssl/opensslconf.h> 14e1051a39Sopenharmony_ci 15e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_MD4 16e1051a39Sopenharmony_ci# include <openssl/e_os2.h> 17e1051a39Sopenharmony_ci# include <stddef.h> 18e1051a39Sopenharmony_ci# ifdef __cplusplus 19e1051a39Sopenharmony_ciextern "C" { 20e1051a39Sopenharmony_ci# endif 21e1051a39Sopenharmony_ci 22e1051a39Sopenharmony_ci/*- 23e1051a39Sopenharmony_ci * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24e1051a39Sopenharmony_ci * ! MD4_LONG has to be at least 32 bits wide. ! 25e1051a39Sopenharmony_ci * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26e1051a39Sopenharmony_ci */ 27e1051a39Sopenharmony_ci# define MD4_LONG unsigned int 28e1051a39Sopenharmony_ci 29e1051a39Sopenharmony_ci# define MD4_CBLOCK 64 30e1051a39Sopenharmony_ci# define MD4_LBLOCK (MD4_CBLOCK/4) 31e1051a39Sopenharmony_ci# define MD4_DIGEST_LENGTH 16 32e1051a39Sopenharmony_ci 33e1051a39Sopenharmony_citypedef struct MD4state_st { 34e1051a39Sopenharmony_ci MD4_LONG A, B, C, D; 35e1051a39Sopenharmony_ci MD4_LONG Nl, Nh; 36e1051a39Sopenharmony_ci MD4_LONG data[MD4_LBLOCK]; 37e1051a39Sopenharmony_ci unsigned int num; 38e1051a39Sopenharmony_ci} MD4_CTX; 39e1051a39Sopenharmony_ci 40e1051a39Sopenharmony_ciint MD4_Init(MD4_CTX *c); 41e1051a39Sopenharmony_ciint MD4_Update(MD4_CTX *c, const void *data, size_t len); 42e1051a39Sopenharmony_ciint MD4_Final(unsigned char *md, MD4_CTX *c); 43e1051a39Sopenharmony_ciunsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 44e1051a39Sopenharmony_civoid MD4_Transform(MD4_CTX *c, const unsigned char *b); 45e1051a39Sopenharmony_ci 46e1051a39Sopenharmony_ci# ifdef __cplusplus 47e1051a39Sopenharmony_ci} 48e1051a39Sopenharmony_ci# endif 49e1051a39Sopenharmony_ci# endif 50e1051a39Sopenharmony_ci 51e1051a39Sopenharmony_ci#endif 52