mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Removed keytype config field in favour of key prefix.
This commit is contained in:
@@ -21,10 +21,10 @@ int init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/**l
|
||||
* Generates a signing key pair using libsodium and assigns them to the provided strings.
|
||||
*/
|
||||
void generate_signing_keys(std::string &pubkey, std::string &seckey, std::string &keytype)
|
||||
void generate_signing_keys(std::string &pubkey, std::string &seckey)
|
||||
{
|
||||
// Generate key pair using libsodium default algorithm.
|
||||
// Currently using ed25519. So append prefix byte to represent that.
|
||||
@@ -36,10 +36,8 @@ void generate_signing_keys(std::string &pubkey, std::string &seckey, std::string
|
||||
seckey[0] = KEYPFX_ed25519;
|
||||
|
||||
crypto_sign_keypair(
|
||||
reinterpret_cast<unsigned char *>(pubkey.data() + 1),
|
||||
reinterpret_cast<unsigned char *>(seckey.data() + 1));
|
||||
|
||||
keytype = crypto_sign_primitive();
|
||||
reinterpret_cast<unsigned char *>(pubkey.data() + 1), // +1 to skip the prefix byte.
|
||||
reinterpret_cast<unsigned char *>(seckey.data() + 1)); // +1 to skip the prefix byte.
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user