Current section

Files

Jump to
perspective lib perspective encryption encryption.ex
Raw

lib/perspective/encryption/encryption.ex

defmodule Perspective.Encryption do
def encrypt(data) do
{encryption_key, authentication_data} = Perspective.EncryptionConfiguration.call(:data)
Perspective.Encryptor.encrypt(data, encryption_key, authentication_data)
end
def decrypt(data) do
{encryption_key, authentication_data} = Perspective.EncryptionConfiguration.call(:data)
Perspective.Decryptor.decrypt(data, encryption_key, authentication_data)
end
end