3 This file is part of the ARM-Crypto-Lib.
4 Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #define JH224_BLOCKSIZE 512
26 #define JH224_BLOCKSIZE_B ((JH224_BLOCKSIZE+7)/8)
27 #define JH256_BLOCKSIZE 512
28 #define JH256_BLOCKSIZE_B ((JH256_BLOCKSIZE+7)/8)
29 #define JH384_BLOCKSIZE 512
30 #define JH384_BLOCKSIZE_B ((JH284_BLOCKSIZE+7)/8)
31 #define JH512_BLOCKSIZE 512
32 #define JH512_BLOCKSIZE_B ((JH512_BLOCKSIZE+7)/8)
36 uint32_t block_hashed;
40 void jh_init(uint16_t hashlen_b, jh_ctx_t* ctx);
41 void jh_nextBlock(jh_ctx_t* ctx, void* block);
42 void jh_lastBlock(jh_ctx_t* ctx, void* block, uint16_t length_b);
43 void jh_ctx2hash(void* dest, uint16_t length_b, jh_ctx_t* ctx);
45 void jh224_init(jh_ctx_t* ctx);
46 void jh224_ctx2hash(void* dest, jh_ctx_t* ctx);
48 void jh256_init(jh_ctx_t* ctx);
49 void jh256_ctx2hash(void* dest, jh_ctx_t* ctx);
51 void jh384_init(jh_ctx_t* ctx);
52 void jh384_ctx2hash(void* dest, jh_ctx_t* ctx);
54 void jh512_init(jh_ctx_t* ctx);
55 void jh512_ctx2hash(void* dest, jh_ctx_t* ctx);
58 #endif /* JH_SIMPLE_H_ */