This commit is contained in:
obscuren
2015-03-05 17:21:16 +01:00
parent c47866d251
commit fabaf4f1f0
3 changed files with 152 additions and 0 deletions

View File

@ -33,6 +33,12 @@ func Bytes2Big(data []byte) *big.Int {
}
func BigD(data []byte) *big.Int { return Bytes2Big(data) }
func String2Big(num string) *big.Int {
n := new(big.Int)
n.SetString(num, 0)
return n
}
func BitTest(num *big.Int, i int) bool {
return num.Bit(i) > 0
}