Telegram Web K with changes to work inside I2P
https://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
394 B
11 lines
394 B
import addPadding from '../bytes/addPadding'; |
|
import bigInt from 'big-integer'; |
|
import { bigIntToBytes } from '../bigInt/bigIntConversion'; |
|
|
|
export default function longToBytes(sLong: string) { |
|
const bigIntBytes = bigIntToBytes(bigInt(sLong)).reverse(); |
|
const bytes = addPadding(bigIntBytes, 8, true, false, false); |
|
// console.log('longToBytes', bytes, bigIntBytes); |
|
|
|
return bytes; |
|
}
|
|
|