aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint/bigint.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-21 02:52:11 -0400
committerJack Lloyd <[email protected]>2018-03-21 02:52:11 -0400
commit66e92c60eb5dff1b32995b2692594f8708c5c029 (patch)
treeb5b74a838422fa32d0f2c7e56ae2299a50344d81 /src/lib/math/bigint/bigint.cpp
parentc22fc530382acb28c3d747baf5eef8f44059182a (diff)
Simplify a common case BigInt constructor
Diffstat (limited to 'src/lib/math/bigint/bigint.cpp')
-rw-r--r--src/lib/math/bigint/bigint.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp
index a42707e07..694c7afab 100644
--- a/src/lib/math/bigint/bigint.cpp
+++ b/src/lib/math/bigint/bigint.cpp
@@ -80,6 +80,11 @@ BigInt::BigInt(const std::string& str)
else set_sign(Positive);
}
+BigInt::BigInt(const uint8_t input[], size_t length)
+ {
+ binary_decode(input, length);
+ }
+
/*
* Construct a BigInt from an encoded BigInt
*/