mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 13:54:15 -07:00
Rename C25519.* to ECC.*
This commit is contained in:
parent
7647c8e8d1
commit
307befa892
22 changed files with 111 additions and 114 deletions
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <node/Constants.hpp>
|
||||
#include <node/World.hpp>
|
||||
#include <node/C25519.hpp>
|
||||
#include <node/ECC.hpp>
|
||||
#include <node/Identity.hpp>
|
||||
#include <node/InetAddress.hpp>
|
||||
#include <osdep/OSUtils.hpp>
|
||||
|
@ -54,7 +54,7 @@ int main(int argc,char **argv)
|
|||
{
|
||||
std::string previous,current;
|
||||
if ((!OSUtils::readFile("previous.c25519",previous))||(!OSUtils::readFile("current.c25519",current))) {
|
||||
C25519::Pair np(C25519::generate());
|
||||
ECC::Pair np(ECC::generate());
|
||||
previous = std::string();
|
||||
previous.append((const char *)np.pub.data,ZT_C25519_PUBLIC_KEY_LEN);
|
||||
previous.append((const char *)np.priv.data,ZT_C25519_PRIVATE_KEY_LEN);
|
||||
|
@ -68,10 +68,10 @@ int main(int argc,char **argv)
|
|||
fprintf(stderr,"FATAL: previous.c25519 or current.c25519 empty or invalid" ZT_EOL_S);
|
||||
return 1;
|
||||
}
|
||||
C25519::Pair previousKP;
|
||||
ECC::Pair previousKP;
|
||||
memcpy(previousKP.pub.data,previous.data(),ZT_C25519_PUBLIC_KEY_LEN);
|
||||
memcpy(previousKP.priv.data,previous.data() + ZT_C25519_PUBLIC_KEY_LEN,ZT_C25519_PRIVATE_KEY_LEN);
|
||||
C25519::Pair currentKP;
|
||||
ECC::Pair currentKP;
|
||||
memcpy(currentKP.pub.data,current.data(),ZT_C25519_PUBLIC_KEY_LEN);
|
||||
memcpy(currentKP.priv.data,current.data() + ZT_C25519_PUBLIC_KEY_LEN,ZT_C25519_PRIVATE_KEY_LEN);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue