Added new big from []bytes

This commit is contained in:
obscuren committed 2014-01-04 00:30:19 +01:00
1 parent 9581faf5fd
commit f97716ebe2
1 file changed
+9
+9
View File
@@ -24,3 +24,12 @@ func Big(num string) *big.Int {
return n
}
/*
* Like big.NewInt(uint64); this takes a byte buffer instead.
*/
func BigD(data []byte) *big.Int {
n := new(big.Int)
n.SetBytes(data)
return n
}