version 1.30, 2003/09/18 13:02:21 |
version 1.31, 2003/11/10 16:23:41 |
|
|
* by (bits+7)/8 bytes of binary data, msb first. |
* by (bits+7)/8 bytes of binary data, msb first. |
*/ |
*/ |
void |
void |
buffer_put_bignum(Buffer *buffer, BIGNUM *value) |
buffer_put_bignum(Buffer *buffer, const BIGNUM *value) |
{ |
{ |
int bits = BN_num_bits(value); |
int bits = BN_num_bits(value); |
int bin_size = (bits + 7) / 8; |
int bin_size = (bits + 7) / 8; |
|
|
* Stores an BIGNUM in the buffer in SSH2 format. |
* Stores an BIGNUM in the buffer in SSH2 format. |
*/ |
*/ |
void |
void |
buffer_put_bignum2(Buffer *buffer, BIGNUM *value) |
buffer_put_bignum2(Buffer *buffer, const BIGNUM *value) |
{ |
{ |
u_int bytes = BN_num_bytes(value) + 1; |
u_int bytes = BN_num_bytes(value) + 1; |
u_char *buf = xmalloc(bytes); |
u_char *buf = xmalloc(bytes); |