|
|
|||
Warning, file /include/rmd160.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* $OpenBSD: rmd160.h,v 1.17 2012/12/05 23:19:57 deraadt Exp $ */ 0002 /* 0003 * Copyright (c) 2001 Markus Friedl. All rights reserved. 0004 * 0005 * Redistribution and use in source and binary forms, with or without 0006 * modification, are permitted provided that the following conditions 0007 * are met: 0008 * 1. Redistributions of source code must retain the above copyright 0009 * notice, this list of conditions and the following disclaimer. 0010 * 2. Redistributions in binary form must reproduce the above copyright 0011 * notice, this list of conditions and the following disclaimer in the 0012 * documentation and/or other materials provided with the distribution. 0013 * 0014 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0015 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0016 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0017 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0018 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0019 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0020 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0021 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0022 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0023 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0024 */ 0025 #ifndef _RMD160_H 0026 #define _RMD160_H 0027 0028 #include <sys/types.h> 0029 0030 #include <stdint.h> 0031 0032 #define RMD160_BLOCK_LENGTH 64 0033 #define RMD160_DIGEST_LENGTH 20 0034 #define RMD160_DIGEST_STRING_LENGTH (RMD160_DIGEST_LENGTH * 2 + 1) 0035 0036 /* RMD160 context. */ 0037 typedef struct RMD160Context { 0038 uint32_t state[5]; /* state */ 0039 uint64_t count; /* number of bits, mod 2^64 */ 0040 uint8_t buffer[RMD160_BLOCK_LENGTH]; /* input buffer */ 0041 } RMD160_CTX; 0042 0043 #ifdef __cplusplus 0044 extern "C" { 0045 #endif 0046 0047 void RMD160Init(RMD160_CTX *); 0048 void RMD160Transform(uint32_t [5], const uint8_t [RMD160_BLOCK_LENGTH]); 0049 void RMD160Update(RMD160_CTX *, const uint8_t *, size_t); 0050 void RMD160Pad(RMD160_CTX *); 0051 void RMD160Final(uint8_t [RMD160_DIGEST_LENGTH], RMD160_CTX *); 0052 char *RMD160End(RMD160_CTX *, char *); 0053 char *RMD160File(const char *, char *); 0054 char *RMD160FileChunk(const char *, char *, off_t, off_t); 0055 char *RMD160Data(const uint8_t *, size_t, char *); 0056 0057 #ifdef __cplusplus 0058 } 0059 #endif 0060 0061 #endif /* _RMD160_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|