Mercurial > dropbear
comparison libtomcrypt/src/modes/lrw/lrw_done.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 lrw_done.c | 12 @file lrw_done.c |
20 /** | 18 /** |
21 Terminate a LRW state | 19 Terminate a LRW state |
22 @param lrw The state to terminate | 20 @param lrw The state to terminate |
23 @return CRYPT_OK if successful | 21 @return CRYPT_OK if successful |
24 */ | 22 */ |
25 int lrw_done(symmetric_LRW *lrw) | 23 int lrw_done(symmetric_LRW *lrw) |
26 { | 24 { |
27 int err; | 25 int err; |
28 | 26 |
29 LTC_ARGCHK(lrw != NULL); | 27 LTC_ARGCHK(lrw != NULL); |
30 | 28 |
31 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { | 29 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { |
32 return err; | 30 return err; |
33 } | 31 } |
34 cipher_descriptor[lrw->cipher].done(&lrw->key); | 32 cipher_descriptor[lrw->cipher].done(&lrw->key); |
35 | 33 |
36 return CRYPT_OK; | 34 return CRYPT_OK; |
37 } | 35 } |
38 | 36 |
39 #endif | 37 #endif |
40 /* $Source$ */ | 38 /* ref: $Format:%D$ */ |
41 /* $Revision$ */ | 39 /* git commit: $Format:%H$ */ |
42 /* $Date$ */ | 40 /* commit time: $Format:%ai$ */ |