aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--big.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/big.go b/big.go
index 44bfee2e4..b0fbcb64f 100644
--- a/big.go
+++ b/big.go
@@ -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
+}