1 // SPDX-License-Identifier: BSD-2-Clause
2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3  *
4  * LibTomCrypt is a library that provides various cryptographic
5  * algorithms in a highly modular and flexible manner.
6  *
7  * The library is free for all purposes without any express
8  * guarantee it works.
9  */
10 #include "tomcrypt_private.h"
11 
12 /**
13    @file dsa_free.c
14    DSA implementation, free a DSA key, Tom St Denis
15 */
16 
17 #ifdef LTC_MDSA
18 
19 /**
20    Free a DSA key
21    @param key   The key to free from memory
22 */
dsa_free(dsa_key * key)23 void dsa_free(dsa_key *key)
24 {
25    LTC_ARGCHKVD(key != NULL);
26    mp_cleanup_multi(&key->y, &key->x, &key->q, &key->g, &key->p, NULL);
27    key->type = key->qord = 0;
28 }
29 
30 #endif
31 
32 /* ref:         $Format:%D$ */
33 /* git commit:  $Format:%H$ */
34 /* commit time: $Format:%ai$ */
35