diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-03 10:29:56 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-03 10:29:56 -0400 |
| commit | 63fa4a684d15409e185422e7641e7c4680d19ec3 (patch) | |
| tree | f24b0535aed69c5eccd415c344675836d6349772 /node/EllipticCurveKey.hpp | |
| parent | 3635a940f921a10f229d67a30fde1be650d3a28e (diff) | |
| parent | 80d8b7d0ae56f1dce8b5b25ab7930df436755daf (diff) | |
| download | infinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.tar.gz infinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.zip | |
Merge my adamierymenko-dev into the new master that incorporates Raspberry Pi build changes in order to keep everything in sync.
Diffstat (limited to 'node/EllipticCurveKey.hpp')
| -rw-r--r-- | node/EllipticCurveKey.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/node/EllipticCurveKey.hpp b/node/EllipticCurveKey.hpp index 5a7b895f..b32f702d 100644 --- a/node/EllipticCurveKey.hpp +++ b/node/EllipticCurveKey.hpp @@ -65,15 +65,19 @@ public: throw() : _bytes(0) { + memset(_key,0,sizeof(_key)); } 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) |
