EncryptedSecrets.Encryption (encrypted_secrets v0.2.3) View Source

Provides methods for reading creating keys and encrypting/decrypting payloads

Link to this section Summary

Functions

Decrypts cipher_text using the given key and init_vec

Encrypts clear_text using the given key

Generates a 256 bit (32 byte) random key to be used as the master key

Link to this section Functions

Link to this function

decrypt(key, init_vec, cipher_text)

View Source

Decrypts cipher_text using the given key and init_vec

Link to this function

encrypt(key, clear_text)

View Source

Encrypts clear_text using the given key

Generates a 256 bit (32 byte) random key to be used as the master key

Examples

iex> binary_key = Encryption.generate_aes_key()
iex> random_string = binary_key |> Base.encode16
iex> String.length(random_string)
64