tweb-i2p/src/helpers/long/longFromInts.ts
Eduard Kuzmenko 37d5b2a9ad Peer-to-Peer calls
Refactor bigInt
Refactor factorizing
2022-03-23 17:15:07 +02:00

8 lines
271 B
TypeScript

import bigInt from "big-integer";
import intToUint from "../number/intToUint";
export default function longFromInts(high: number, low: number): string {
high = intToUint(high), low = intToUint(low);
return bigInt(high).shiftLeft(32).add(bigInt(low)).toString(10);
}