X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/a4b808b03590fcaace247ed007d035c6bee8e353..ed621603eb44a44973084d943f64bea3a64b31e6:/server/servutil.c diff --git a/server/servutil.c b/server/servutil.c index dbca451d..ed73e6d2 100644 --- a/server/servutil.c +++ b/server/servutil.c @@ -9,19 +9,18 @@ * * This file is part of Trivial IP Encryption (TrIPE). * - * TrIPE is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * TrIPE is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your + * option) any later version. * - * TrIPE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * TrIPE is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * * You should have received a copy of the GNU General Public License - * along with TrIPE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with TrIPE. If not, see . */ /*----- Header files ------------------------------------------------------*/ @@ -34,41 +33,6 @@ octet buf_i[PKBUFSZ], buf_o[PKBUFSZ], buf_t[PKBUFSZ], buf_u[PKBUFSZ]; /*----- Main code ---------------------------------------------------------*/ -/* --- @mpstr@ --- * - * - * Arguments: @mp *m@ = a multiprecision integer - * - * Returns: A pointer to the integer's textual representation. - * - * Use: Converts a multiprecision integer to a string. Corrupts - * @buf_u@. - */ - -const char *mpstr(mp *m) -{ - if (mp_writestring(m, (char *)buf_u, sizeof(buf_u), 10)) - return (""); - return ((const char *)buf_u); -} - -/* --- @gestr@ --- * - * - * Arguments: @group *g@ = a group - * @ge *x@ = a group element - * - * Returns: A pointer to the element's textual representation. - * - * Use: Converts a group element to a string. Corrupts - * @buf_u@. - */ - -const char *gestr(group *g, ge *x) -{ - if (group_writestring(g, x, (char *)buf_u, sizeof(buf_u))) - return (""); - return ((const char *)buf_u); -} - /* --- @timestr@ --- * * * Arguments: @time_t t@ = a time to convert