Signextend

This commit is contained in:
obscuren
2014-11-01 02:14:55 +01:00
parent c8438979a9
commit 3f90f7c898
2 changed files with 18 additions and 0 deletions

View File

@ -34,6 +34,10 @@ func BigD(data []byte) *big.Int {
return n
}
func BitTest(num *big.Int, i int) bool {
return num.Bit(i) > 0
}
// To256
//
// "cast" the big int to a 256 big int (i.e., limit to)