Core/Misc: Support IPv6 ip2location

This commit is contained in:
Shauren
2024-11-14 00:13:18 +01:00
parent e8d949c794
commit c522e5f4c2
6 changed files with 60 additions and 27 deletions

View File

@@ -61,6 +61,12 @@ void BigNumber::SetBinary(uint8 const* bytes, int32 len, bool littleEndian)
BN_bin2bn(bytes, len, _bn);
}
bool BigNumber::SetDecStr(char const* str)
{
int n = BN_dec2bn(&_bn, str);
return n > 0;
}
bool BigNumber::SetHexStr(char const* str)
{
int n = BN_hex2bn(&_bn, str);