aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/bigint
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-29 15:15:30 +0000
committerlloyd <[email protected]>2010-10-29 15:15:30 +0000
commit66b163323d39ac5c0be30fd0b1c0fd91b64a55f3 (patch)
treee745b4824105f600ec5452e591a112229bc01478 /src/math/bigint
parent89a2e78d2ff2f0266825708a0294b13a4c370a29 (diff)
Make MemoryRegion::set protected, change all callers
Diffstat (limited to 'src/math/bigint')
-rw-r--r--src/math/bigint/bigint.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/math/bigint/bigint.h b/src/math/bigint/bigint.h
index 9a2513d1b..12a7f1701 100644
--- a/src/math/bigint/bigint.h
+++ b/src/math/bigint/bigint.h
@@ -325,6 +325,15 @@ class BOTAN_DLL BigInt
const SecureVector<word>& get_reg() const { return reg; }
/**
+ * Assign using a plain word array
+ */
+ void assign(const word x[], size_t length)
+ {
+ reg.resize(length);
+ copy_mem(&reg[0], x, length);
+ }
+
+ /**
* Increase internal register buffer by n words
* @param n increase by n words
*/