Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(124802)

Delta Between Two Patch Sets: Modules/_blake2/impl/blake2.h

Issue 26798: add BLAKE2 to hashlib
Left Patch Set: Created 3 years, 6 months ago
Right Patch Set: Created 3 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Modules/_blake2/impl/blake2-config.h ('k') | Modules/_blake2/impl/blake2-impl.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 BLAKE2 reference source code package - reference C implementations 2 BLAKE2 reference source code package - reference C implementations
3 3
4 Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the 4 Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the
5 terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at 5 terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
6 your option. The terms of these licenses can be found at: 6 your option. The terms of these licenses can be found at:
7 7
8 - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 8 - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
9 - OpenSSL license : https://www.openssl.org/source/license.html 9 - OpenSSL license : https://www.openssl.org/source/license.html
10 - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 10 - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11 11
12 More information about the BLAKE2 hash function can be found at 12 More information about the BLAKE2 hash function can be found at
13 https://blake2.net. 13 https://blake2.net.
14 */ 14 */
15 #pragma once 15 #pragma once
16 #ifndef __BLAKE2_H__ 16 #ifndef __BLAKE2_H__
17 #define __BLAKE2_H__ 17 #define __BLAKE2_H__
18 18
19 #include <stddef.h> 19 #include <stddef.h>
20 #include <stdint.h> 20 #include <stdint.h>
21
22 #ifdef BLAKE2_NO_INLINE
23 #define BLAKE2_LOCAL_INLINE(type) static type
24 #endif
25
26 #ifndef BLAKE2_LOCAL_INLINE
27 #define BLAKE2_LOCAL_INLINE(type) static inline type
28 #endif
21 29
22 #if defined(__cplusplus) 30 #if defined(__cplusplus)
23 extern "C" { 31 extern "C" {
24 #endif 32 #endif
25 33
26 enum blake2s_constant 34 enum blake2s_constant
27 { 35 {
28 BLAKE2S_BLOCKBYTES = 64, 36 BLAKE2S_BLOCKBYTES = 64,
29 BLAKE2S_OUTBYTES = 32, 37 BLAKE2S_OUTBYTES = 32,
30 BLAKE2S_KEYBYTES = 32, 38 BLAKE2S_KEYBYTES = 32,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 { 152 {
145 return blake2b( out, in, key, outlen, inlen, keylen ); 153 return blake2b( out, in, key, outlen, inlen, keylen );
146 } 154 }
147 155
148 #if defined(__cplusplus) 156 #if defined(__cplusplus)
149 } 157 }
150 #endif 158 #endif
151 159
152 #endif 160 #endif
153 161
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+