mirror of
https://github.com/stakwork/sphinx-key.git
synced 2026-02-20 15:15:13 +01:00
22 lines
525 B
Plaintext
22 lines
525 B
Plaintext
[Error]
|
|
enum CrypterError {
|
|
"DerivePublicKey",
|
|
"DeriveSharedSecret",
|
|
"Encrypt",
|
|
"Decrypt",
|
|
"BadPubkey",
|
|
"BadSecret",
|
|
"BadNonce",
|
|
"BadCiper",
|
|
};
|
|
|
|
namespace crypter {
|
|
[Throws=CrypterError]
|
|
string pubkey_from_secret_key(string my_secret_key);
|
|
[Throws=CrypterError]
|
|
string derive_shared_secret(string their_pubkey, string my_secret_key);
|
|
[Throws=CrypterError]
|
|
string encrypt(string plaintext, string secret, string nonce);
|
|
[Throws=CrypterError]
|
|
string decrypt(string ciphertext, string secret);
|
|
}; |