mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
num_openssl.h bugfixes
This commit is contained in:
parent
e3f741f1d4
commit
d1fdf30dcc
2 changed files with 4 additions and 4 deletions
4
num.h
4
num.h
|
@ -1,7 +1,7 @@
|
|||
#ifndef _SECP256K1_NUM_
|
||||
#define _SECP256K1_NUM_
|
||||
|
||||
#include "num_gmp.h"
|
||||
// #include "num_openssl.h"
|
||||
// #include "num_gmp.h"
|
||||
#include "num_openssl.h"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
int size = BN_num_bytes(bn);
|
||||
assert(size <= len);
|
||||
memset(bin,0,len);
|
||||
BN_bn2bin(bn, bin + size - len);
|
||||
BN_bn2bin(bn, bin + len - size);
|
||||
}
|
||||
void SetInt(int x) {
|
||||
if (x >= 0) {
|
||||
|
@ -149,7 +149,7 @@ public:
|
|||
BN_rshift(high.bn, bn, bits);
|
||||
}
|
||||
|
||||
std::string ToString() {
|
||||
std::string ToString() const {
|
||||
char *str = BN_bn2hex(bn);
|
||||
std::string ret(str);
|
||||
OPENSSL_free(str);
|
||||
|
|
Loading…
Add table
Reference in a new issue