SodiumSeal

SodiumSeal wraps libsodium's sealed boxes.

SodiumSeal.KeyPairType
KeyPair([public[, secret]])

Construct a new KeyPair with existing keys, or generate a new one. If the keys are AbstractStrings, they are assumed to be Base64-encoded. If you are only interested in encrypting, you need not supply the secret key.

source
SodiumSeal.sealMethod
seal(plaintext, keypair::KeyPair) -> Union{String, Vector{UInt8}}

Encrypt some data.

If plaintext is an AbstractString, it is assumed to be Base64-encoded, and the output is also a Base64-encoded String. Otherwise, it is a Vector{UInt8}.

source
SodiumSeal.unsealMethod
unseal(ciphertext, keypair::KeyPair) -> Union{String, Vector{UInt8}}

Decrypt some data.

If ciphertext is an AbstractString, it is assumed to be Base64-encoded, and the output is also a Base64-encoded String. Otherwise, it is a Vector{UInt8}.

source