mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-19 03:51:02 -05:00
Utility function mp_resize.
This reallocs an existing mp_int to have a different physical size, e.g. to make sure there's enough space at the top of it. Trivial, but I'm a little surprised I haven't needed it until now!
This commit is contained in:
7
mpint.h
7
mpint.h
@ -42,6 +42,13 @@ mp_int *mp_new(size_t maxbits);
|
||||
void mp_free(mp_int *);
|
||||
void mp_clear(mp_int *x);
|
||||
|
||||
/*
|
||||
* Resize the physical size of existing mp_int, e.g. so that you have
|
||||
* room to transform it in place to a larger value. Destroys the old
|
||||
* mp_int in the process.
|
||||
*/
|
||||
mp_int *mp_resize(mp_int *, size_t newmaxbits);
|
||||
|
||||
/*
|
||||
* Create mp_ints from various sources: little- and big-endian binary
|
||||
* data, an ordinary C unsigned integer type, a decimal or hex string
|
||||
|
Reference in New Issue
Block a user