diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-27 16:26:06 -0400 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-27 16:26:06 -0400 |
commit | 304ed641fedc148520551904ff1b1819a230561d (patch) | |
tree | c7be9f6b430dd37545a60f21c8eb89b2b5ee6b16 /node | |
parent | 7a17f6ca80e3df9e1509dc99d0acdd00f12686e0 (diff) | |
download | infinitytier-304ed641fedc148520551904ff1b1819a230561d.tar.gz infinitytier-304ed641fedc148520551904ff1b1819a230561d.zip |
makekeypair utility
Diffstat (limited to 'node')
-rw-r--r-- | node/EllipticCurveKey.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/node/EllipticCurveKey.hpp b/node/EllipticCurveKey.hpp index cc666104..b32f702d 100644 --- a/node/EllipticCurveKey.hpp +++ b/node/EllipticCurveKey.hpp @@ -71,10 +71,13 @@ public: EllipticCurveKey(const void *data,unsigned int len) throw() { - if (len <= ZT_EC_MAX_BYTES) { - _bytes = len; - memcpy(_key,data,len); - } else _bytes = 0; + set(data,len); + } + + EllipticCurveKey(const std::string &data) + throw() + { + set(data.data(),data.length()); } EllipticCurveKey(const EllipticCurveKey &k) |