00001 00007 /* 00008 * Copyright (c) 1997, 1998, 1999, 2000, 2001 Virtual Unlimited B.V. 00009 * 00010 * Author: Bob Deblier <bob@virtualunlimited.com> 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 #ifndef _MP32NUMBER_H 00029 #define _MP32NUMBER_H 00030 00031 #include "types.h" 00032 00035 typedef struct 00036 { 00037 uint32 size; 00038 /*@owned@*/ /*@relnull@*/ 00039 uint32* data; 00040 } mp32number; 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00048 BEECRYPTAPI 00049 void mp32nzero(/*@out@*/ mp32number* n) 00050 /*@modifies n->size, n->data @*/; 00051 00054 BEECRYPTAPI 00055 void mp32nsize(mp32number* n, uint32 size) 00056 /*@modifies n->size, n->data @*/; 00057 00060 BEECRYPTAPI /*@unused@*/ 00061 void mp32ninit(mp32number* n, uint32 size, const uint32* data) 00062 /*@modifies n->size, n->data @*/; 00063 00066 BEECRYPTAPI 00067 void mp32nfree(mp32number* n) 00068 /*@modifies n->size, n->data @*/; 00069 00072 BEECRYPTAPI 00073 void mp32ncopy(mp32number* n, const mp32number* copy) 00074 /*@modifies n->size, n->data @*/; 00075 00078 BEECRYPTAPI 00079 void mp32nwipe(mp32number* n) 00080 /*@modifies n->size, n->data @*/; 00081 00084 BEECRYPTAPI 00085 void mp32nset (mp32number* n, uint32 size, /*@null@*/ const uint32* data) 00086 /*@modifies n->size, n->data @*/; 00087 00090 BEECRYPTAPI 00091 void mp32nsetw (mp32number* n, uint32 val) 00092 /*@modifies n->size, n->data @*/; 00093 00096 BEECRYPTAPI /*@unused@*/ 00097 void mp32nsethex(/*@out@*/ mp32number* n, const char* hex) 00098 /*@modifies n->size, n->data @*/; 00099 00100 #ifdef __cplusplus 00101 } 00102 #endif 00103 00104 #endif