X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcmath%2Fsilcmp.h;h=662de1720c0072cbfa3f64ff6f623a1c004081d3;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=ccc15a670a7d2e4374ad959976be9baff1f924c9;hpb=d1e71f42379e8b5cd0748a7aeae8561b02cfe53d;p=silc.git diff --git a/lib/silcmath/silcmp.h b/lib/silcmath/silcmp.h index ccc15a67..662de172 100644 --- a/lib/silcmath/silcmp.h +++ b/lib/silcmath/silcmp.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2005 Pekka Riikonen + Copyright (C) 1997 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,30 @@ typedef SILC_MP_INT SilcMPInt; * * DESCRIPTION * - * Initializes the SilcMPInt *that is the actual MP Integer. + * Initializes the SilcMPInt that is the actual MP Integer. * This must be called before any of the silc_mp_ routines can be * used. The integer is uninitialized with the silc_mp_uninit function. * ***/ void silc_mp_init(SilcMPInt *mp); +/****f* silcmath/SilcMPAPI/silc_mp_sinit + * + * SYNOPSIS + * + * SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp); + * + * DESCRIPTION + * + * Initializes the SilcMPInt that is the actual MP Integer. + * This must be called before any of the silc_mp_ routines can be + * used. The integer is uninitialized with the silc_mp_suninit function. + * If `stack' is non-NULL it will be used as the memory source. If it + * is NULL, this call is equivalent to silc_mp_init. + * + ***/ +SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp); + /****f* silcmath/SilcMPAPI/silc_mp_uninit * * SYNOPSIS @@ -88,6 +105,19 @@ void silc_mp_init(SilcMPInt *mp); ***/ void silc_mp_uninit(SilcMPInt *mp); +/****f* silcmath/SilcMPAPI/silc_mp_suninit + * + * SYNOPSIS + * + * void silc_mp_suninit(SilcStack stack, SilcMPInt *mp); + * + * DESCRIPTION + * + * Uninitializes the MP Integer. + * + ***/ +void silc_mp_suninit(SilcStack stack, SilcMPInt *mp); + /****f* silcmath/SilcMPAPI/silc_mp_size * * SYNOPSIS @@ -638,7 +668,7 @@ unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len, * DESCRIPTION * * Same as silc_mp_mp2bin but does not allocate any memory. The - * encoded data is returned into `dst' and it's length to the `ret_len'. + * encoded data is returned into `dst' of size of `dst_len'. * ***/ void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,