summaryrefslogtreecommitdiff
path: root/node/Identity.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <[email protected]>2018-01-26 20:00:37 -0500
committerAdam Ierymenko <[email protected]>2018-01-26 20:00:37 -0500
commitf3dfd636343904a01681c80e91b44aa00ce33f2e (patch)
tree12ab5514aaffaba0759bef88fa3b2c8a34bad565 /node/Identity.cpp
parent5f5302e59535c988188e3857469c5414014d62c4 (diff)
Clean up some old stuff.
Diffstat (limited to 'node/Identity.cpp')
-rw-r--r--node/Identity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/Identity.cpp b/node/Identity.cpp
index 9cc507f7..03f27083 100644
--- a/node/Identity.cpp
+++ b/node/Identity.cpp
@@ -87,7 +87,7 @@ struct _Identity_generate_cond
_Identity_generate_cond(unsigned char *sb,char *gm) : digest(sb),genmem(gm) {}
inline bool operator()(const C25519::Pair &kp) const
{
- _computeMemoryHardHash(kp.pub.data,(unsigned int)kp.pub.size(),digest,genmem);
+ _computeMemoryHardHash(kp.pub.data,ZT_C25519_PUBLIC_KEY_LEN,digest,genmem);
return (digest[0] < ZT_IDENTITY_GEN_HASHCASH_FIRST_BYTE_LESS_THAN);
}
unsigned char *digest;
@@ -120,7 +120,7 @@ bool Identity::locallyValidate() const
unsigned char digest[64];
char *genmem = new char[ZT_IDENTITY_GEN_MEMORY];
- _computeMemoryHardHash(_publicKey.data,(unsigned int)_publicKey.size(),digest,genmem);
+ _computeMemoryHardHash(_publicKey.data,ZT_C25519_PUBLIC_KEY_LEN,digest,genmem);
delete [] genmem;
unsigned char addrb[5];
@@ -187,14 +187,14 @@ bool Identity::fromString(const char *str)
}
break;
case 2:
- if (Utils::unhex(f,_publicKey.data,(unsigned int)_publicKey.size()) != _publicKey.size()) {
+ if (Utils::unhex(f,_publicKey.data,ZT_C25519_PUBLIC_KEY_LEN) != ZT_C25519_PUBLIC_KEY_LEN) {
_address.zero();
return false;
}
break;
case 3:
_privateKey = new C25519::Private();
- if (Utils::unhex(f,_privateKey->data,(unsigned int)_privateKey->size()) != _privateKey->size()) {
+ if (Utils::unhex(f,_privateKey->data,ZT_C25519_PRIVATE_KEY_LEN) != ZT_C25519_PRIVATE_KEY_LEN) {
_address.zero();
return false;
}