I have a BigInt 170141183460469231731687303715884105728n which is 128 bit integer, then i want to convert that integer to buffer.
But as i know, nodejs Buffer is doesn't support 128 or 256 bit integer, only 64 bit integer they supported.
So the question is, how to convert that integer to buffer? i have search in internet but i didn't find anything.
Sorry if my English is bad, thanks you for your answer.
I found a way to fix this issue, i do looping
16times (Buffer length of 128Int is16, 256Int is32) then shift right with8(Buffer length of 64Int)*index of loopingon the bigint and dobitwise and(&=) with255(range max of buffer). Maybe someone found a better way than this.