mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-06-07 10:47:08 +00:00
Support message separation for multiple inputs from same user. (#142)
This commit is contained in:
committed by
GitHub
parent
202a6a2715
commit
51173e37f2
@@ -10,30 +10,32 @@
|
||||
namespace crypto
|
||||
{
|
||||
|
||||
// Prefix byte to append to ed25519 keys.
|
||||
static unsigned char KEYPFX_ed25519 = 0xED;
|
||||
// Prefixed public key bytes.
|
||||
static size_t PFXD_PUBKEY_BYTES = crypto_sign_ed25519_PUBLICKEYBYTES + 1;
|
||||
// Prefixed secret key bytes.
|
||||
static size_t PFXD_SECKEY_BYTES = crypto_sign_ed25519_SECRETKEYBYTES + 1;
|
||||
// Prefix byte to append to ed25519 keys.
|
||||
static unsigned char KEYPFX_ed25519 = 0xED;
|
||||
// Prefixed public key bytes.
|
||||
static size_t PFXD_PUBKEY_BYTES = crypto_sign_ed25519_PUBLICKEYBYTES + 1;
|
||||
// Prefixed secret key bytes.
|
||||
static size_t PFXD_SECKEY_BYTES = crypto_sign_ed25519_SECRETKEYBYTES + 1;
|
||||
|
||||
int init();
|
||||
int init();
|
||||
|
||||
void generate_signing_keys(std::string &pubkey, std::string &seckey);
|
||||
void generate_signing_keys(std::string &pubkey, std::string &seckey);
|
||||
|
||||
std::string sign(std::string_view msg, std::string_view seckey);
|
||||
std::string sign(std::string_view msg, std::string_view seckey);
|
||||
|
||||
std::string sign_hex(std::string_view msg, std::string_view seckeyhex);
|
||||
std::string sign_hex(std::string_view msg, std::string_view seckeyhex);
|
||||
|
||||
int verify(std::string_view msg, std::string_view sig, std::string_view pubkey);
|
||||
int verify(std::string_view msg, std::string_view sig, std::string_view pubkey);
|
||||
|
||||
int verify_hex(std::string_view msg, std::string_view sighex, std::string_view pubkeyhex);
|
||||
int verify_hex(std::string_view msg, std::string_view sighex, std::string_view pubkeyhex);
|
||||
|
||||
std::string get_hash(std::string_view data);
|
||||
std::string get_hash(std::string_view data);
|
||||
|
||||
std::string get_hash(const unsigned char * data, size_t data_length);
|
||||
std::string get_hash(const unsigned char *data, size_t data_length);
|
||||
|
||||
std::string get_hash(std::string_view s1, std::string_view s2);
|
||||
std::string get_hash(std::string_view s1, std::string_view s2);
|
||||
|
||||
std::string get_hash(const std::vector<std::string_view> &sw_vect);
|
||||
|
||||
} // namespace crypto
|
||||
|
||||
|
||||
Reference in New Issue
Block a user