]>
Commit | Line | Data |
---|---|---|
21dcbebc RS |
1 | /* |
2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. | |
58964a49 | 3 | * |
48f4ad77 | 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
21dcbebc RS |
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 | |
58964a49 RE |
8 | */ |
9 | ||
ae4186b0 DMSP |
10 | #ifndef OPENSSL_RIPEMD_H |
11 | # define OPENSSL_RIPEMD_H | |
d86167ec DMSP |
12 | # pragma once |
13 | ||
14 | # include <openssl/macros.h> | |
15 | # if !OPENSSL_API_3 | |
16 | # define HEADER_RIPEMD_H | |
17 | # endif | |
58964a49 | 18 | |
3c27208f RS |
19 | # include <openssl/opensslconf.h> |
20 | ||
21 | #ifndef OPENSSL_NO_RMD160 | |
0f113f3e MC |
22 | # include <openssl/e_os2.h> |
23 | # include <stddef.h> | |
3c27208f | 24 | # ifdef __cplusplus |
58964a49 | 25 | extern "C" { |
0f113f3e | 26 | # endif |
f5d7a031 | 27 | |
04f8bcf1 | 28 | # define RIPEMD160_LONG unsigned int |
28e0be13 | 29 | |
0f113f3e MC |
30 | # define RIPEMD160_CBLOCK 64 |
31 | # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) | |
32 | # define RIPEMD160_DIGEST_LENGTH 20 | |
58964a49 | 33 | |
0f113f3e MC |
34 | typedef struct RIPEMD160state_st { |
35 | RIPEMD160_LONG A, B, C, D, E; | |
36 | RIPEMD160_LONG Nl, Nh; | |
37 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; | |
38 | unsigned int num; | |
39 | } RIPEMD160_CTX; | |
58964a49 | 40 | |
2dc769a1 | 41 | int RIPEMD160_Init(RIPEMD160_CTX *c); |
9e0aad9f | 42 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); |
2dc769a1 | 43 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); |
0f113f3e | 44 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); |
28e0be13 | 45 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); |
3c27208f RS |
46 | |
47 | # ifdef __cplusplus | |
58964a49 | 48 | } |
3c27208f RS |
49 | # endif |
50 | # endif | |
51 | ||
58964a49 RE |
52 | |
53 | #endif |