aboutsummaryrefslogtreecommitdiffstats
path: root/big.go
diff options
context:
space:
mode:
authorobscuren <obscuren@obscura.com>2014-01-04 07:30:19 +0800
committerobscuren <obscuren@obscura.com>2014-01-04 07:30:19 +0800
commitf97716ebe287349729821d826141e73a6e55702e (patch)
tree66c2d53b8bad9b6d0ba630e26f62733e2d7c3125 /big.go
parent9581faf5fdacf4a135bcdf77d6f0fbe0d6eecba8 (diff)
downloadgo-tangerine-f97716ebe287349729821d826141e73a6e55702e.tar.gz
go-tangerine-f97716ebe287349729821d826141e73a6e55702e.tar.zst
go-tangerine-f97716ebe287349729821d826141e73a6e55702e.zip
Added new big from []bytes
Diffstat (limited to 'big.go')
-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
+}