comparison libtomcrypt/src/encauth/eax/eax_encrypt.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 9
12 /** 10 /**
13 @file eax_encrypt.c 11 @file eax_encrypt.c
14 EAX implementation, encrypt block by Tom St Denis 12 EAX implementation, encrypt block by Tom St Denis
15 */ 13 */
16 #include "tomcrypt.h" 14 #include "tomcrypt.h"
17 15
18 #ifdef LTC_EAX_MODE 16 #ifdef LTC_EAX_MODE
19 17
23 @param pt The plaintext to encrypt 21 @param pt The plaintext to encrypt
24 @param ct [out] The ciphertext as encrypted 22 @param ct [out] The ciphertext as encrypted
25 @param length The length of the plaintext (octets) 23 @param length The length of the plaintext (octets)
26 @return CRYPT_OK if successful 24 @return CRYPT_OK if successful
27 */ 25 */
28 int eax_encrypt(eax_state *eax, const unsigned char *pt, unsigned char *ct, 26 int eax_encrypt(eax_state *eax, const unsigned char *pt, unsigned char *ct,
29 unsigned long length) 27 unsigned long length)
30 { 28 {
31 int err; 29 int err;
32 30
33 LTC_ARGCHK(eax != NULL); 31 LTC_ARGCHK(eax != NULL);
34 LTC_ARGCHK(pt != NULL); 32 LTC_ARGCHK(pt != NULL);
35 LTC_ARGCHK(ct != NULL); 33 LTC_ARGCHK(ct != NULL);
36 34
37 /* encrypt */ 35 /* encrypt */
44 } 42 }
45 43
46 #endif 44 #endif
47 45
48 46
49 /* $Source$ */ 47 /* ref: $Format:%D$ */
50 /* $Revision$ */ 48 /* git commit: $Format:%H$ */
51 /* $Date$ */ 49 /* commit time: $Format:%ai$ */