mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Support for compiling on 32-bit platforms. The main issue was BN_ULONG size and not using 'long' where
'long long' or 'uint64' should be used.
This commit is contained in:
@@ -51,7 +51,7 @@ inline std::string EncodeBase58(const unsigned char* pbegin, const unsigned char
|
||||
if (!BN_div(&dv, &rem, &bn, &bn58, pctx))
|
||||
throw bignum_error("EncodeBase58 : BN_div failed");
|
||||
bn = dv;
|
||||
unsigned int c = rem.getulong();
|
||||
unsigned int c = rem.getuint();
|
||||
str += ALPHABET[c];
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ inline bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
bnChar.setulong(p1 - ALPHABET);
|
||||
bnChar.setuint(p1 - ALPHABET);
|
||||
if (!BN_mul(&bn, &bn, &bn58, pctx))
|
||||
throw bignum_error("DecodeBase58 : BN_mul failed");
|
||||
bn += bnChar;
|
||||
|
||||
Reference in New Issue
Block a user