mirror of
https://github.com/muun/recovery.git
synced 2025-02-23 11:32:33 -05:00
17 lines
251 B
Go
17 lines
251 B
Go
package libwallet
|
|
|
|
import (
|
|
"math/big"
|
|
)
|
|
|
|
func paddedSerializeBigInt(size uint, x *big.Int) []byte {
|
|
src := x.Bytes()
|
|
dst := make([]byte, 0, size)
|
|
|
|
for i := 0; i < int(size)-len(src); i++ {
|
|
dst = append(dst, 0)
|
|
}
|
|
|
|
return append(dst, src...)
|
|
}
|