Module safe_app::ffi::crypto [] [src]

Crypto-related routines

Functions

app_pub_enc_key

Get the public encryption key of the app.

app_pub_sign_key

Get the public signing key of the app.

decrypt

Decrypts arbitrary data using a given key pair. You should provide a sender's public key and a recipient's secret key.

decrypt_sealed_box

Decrypts arbitrary data for a single recipient. You should provide a recipients's private and public key.

enc_generate_key_pair

Generate a new encryption key pair (public & private key).

enc_pub_key_free

Free encryption key from memory

enc_pub_key_get

Retrieve the public encryption key as raw array.

enc_pub_key_new

Create new public encryption key from raw array.

enc_secret_key_free

Free private key from memory.

enc_secret_key_get

Retrieve the private encryption key as raw array.

enc_secret_key_new

Create new public encryption key from raw array.

encrypt

Encrypts arbitrary data using a given key pair. You should provide a recipient's public key and a sender's secret key.

encrypt_sealed_box

Encrypts arbitrary data for a single recipient. You should provide a recipient's public key.

generate_nonce

Generates a unique nonce and returns the result.

sha3_hash

Returns a sha3 hash for a given data.

sign_key_free

Free signing key from memory.

sign_key_get

Retrieve the public signing key as raw array.

sign_key_new

Create new public signing key from raw array.