diff options
author | obscuren <obscuren@obscura.com> | 2014-01-04 07:30:19 +0800 |
---|---|---|
committer | obscuren <obscuren@obscura.com> | 2014-01-04 07:30:19 +0800 |
commit | f97716ebe287349729821d826141e73a6e55702e (patch) | |
tree | 66c2d53b8bad9b6d0ba630e26f62733e2d7c3125 | |
parent | 9581faf5fdacf4a135bcdf77d6f0fbe0d6eecba8 (diff) | |
download | dexon-f97716ebe287349729821d826141e73a6e55702e.tar dexon-f97716ebe287349729821d826141e73a6e55702e.tar.gz dexon-f97716ebe287349729821d826141e73a6e55702e.tar.bz2 dexon-f97716ebe287349729821d826141e73a6e55702e.tar.lz dexon-f97716ebe287349729821d826141e73a6e55702e.tar.xz dexon-f97716ebe287349729821d826141e73a6e55702e.tar.zst dexon-f97716ebe287349729821d826141e73a6e55702e.zip |
Added new big from []bytes
-rw-r--r-- | big.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 +} |