comparison libtomcrypt/src/modes/ecb/ecb_start.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
3 * LibTomCrypt is a library that provides various cryptographic 3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 *
9 * Tom St Denis, [email protected], http://libtom.org
10 */ 8 */
11 #include "tomcrypt.h" 9 #include "tomcrypt.h"
12 10
13 /** 11 /**
14 @file ecb_start.c 12 @file ecb_start.c
19 #ifdef LTC_ECB_MODE 17 #ifdef LTC_ECB_MODE
20 18
21 /** 19 /**
22 Initialize a ECB context 20 Initialize a ECB context
23 @param cipher The index of the cipher desired 21 @param cipher The index of the cipher desired
24 @param key The secret key 22 @param key The secret key
25 @param keylen The length of the secret key (octets) 23 @param keylen The length of the secret key (octets)
26 @param num_rounds Number of rounds in the cipher desired (0 for default) 24 @param num_rounds Number of rounds in the cipher desired (0 for default)
27 @param ecb The ECB state to initialize 25 @param ecb The ECB state to initialize
28 @return CRYPT_OK if successful 26 @return CRYPT_OK if successful
29 */ 27 */
41 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ecb->key); 39 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ecb->key);
42 } 40 }
43 41
44 #endif 42 #endif
45 43
46 /* $Source$ */ 44 /* ref: $Format:%D$ */
47 /* $Revision$ */ 45 /* git commit: $Format:%H$ */
48 /* $Date$ */ 46 /* commit time: $Format:%ai$ */