mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
mpint: add a few simple bitwise operations.
I want to use mp_xor_into as part of an upcoming test program, and while I'm at it, I thought I'd add a few other obvious bitops too.
This commit is contained in:
8
mpint.h
8
mpint.h
@ -197,6 +197,14 @@ mp_int *mp_add(mp_int *x, mp_int *y);
|
||||
mp_int *mp_sub(mp_int *x, mp_int *y);
|
||||
mp_int *mp_mul(mp_int *x, mp_int *y);
|
||||
|
||||
/*
|
||||
* Bitwise operations.
|
||||
*/
|
||||
void mp_and_into(mp_int *r, mp_int *a, mp_int *b);
|
||||
void mp_or_into(mp_int *r, mp_int *a, mp_int *b);
|
||||
void mp_xor_into(mp_int *r, mp_int *a, mp_int *b);
|
||||
void mp_bic_into(mp_int *r, mp_int *a, mp_int *b);
|
||||
|
||||
/*
|
||||
* Addition, subtraction and multiplication with one argument small
|
||||
* enough to fit in a C integer. For mp_mul_integer_into, it has to be
|
||||
|
Reference in New Issue
Block a user