Mercurial > dropbear
comparison libtomcrypt/src/pk/rsa/rsa_free.c @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 6dba84798cd5 |
children |
comparison
equal
deleted
inserted
replaced
1457:32f990cc96b1 | 1511:5916af64acd4 |
---|---|
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 rsa_free.c | 12 @file rsa_free.c |
15 Free an RSA key, Tom St Denis | 13 Free an RSA key, Tom St Denis |
16 */ | 14 */ |
17 | 15 |
18 #ifdef LTC_MRSA | 16 #ifdef LTC_MRSA |
19 | 17 |
20 /** | 18 /** |
21 Free an RSA key from memory | 19 Free an RSA key from memory |
22 @param key The RSA key to free | 20 @param key The RSA key to free |
23 */ | 21 */ |
24 void rsa_free(rsa_key *key) | 22 void rsa_free(rsa_key *key) |
25 { | 23 { |
26 LTC_ARGCHKVD(key != NULL); | 24 LTC_ARGCHKVD(key != NULL); |
27 mp_clear_multi(key->e, key->d, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); | 25 mp_cleanup_multi(&key->q, &key->p, &key->qP, &key->dP, &key->dQ, &key->N, &key->d, &key->e, NULL); |
28 } | 26 } |
29 | 27 |
30 #endif | 28 #endif |
31 | 29 |
32 /* $Source$ */ | 30 /* ref: $Format:%D$ */ |
33 /* $Revision$ */ | 31 /* git commit: $Format:%H$ */ |
34 /* $Date$ */ | 32 /* commit time: $Format:%ai$ */ |