Files
sphinx-key/crypter-ffi/src/crypter.udl
2022-07-11 15:44:44 -07:00

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);
};