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 
11 #include "tomcrypt_private.h"
12 
13 #ifdef LTC_MDH
14 
15 /**
16   Free the allocated ram for a DH key
17   @param key   The key which you wish to free
18 */
dh_free(dh_key * key)19 void dh_free(dh_key *key)
20 {
21    LTC_ARGCHKVD(key != NULL);
22    mp_cleanup_multi(&key->prime, &key->base, &key->y, &key->x, NULL);
23 }
24 
25 #endif /* LTC_MDH */
26 
27 /* ref:         $Format:%D$ */
28 /* git commit:  $Format:%H$ */
29 /* commit time: $Format:%ai$ */
30