ex_aws_s3_crypto v0.1.1 ExAws.S3.Crypto.AESGCMCipher View Source

This module wraps the logic necessary to encrypt / decrypt using AES GCM.

See the Erlang docs for encrypt and decrypt for more info.

Link to this section Summary

Functions

Decrypt the given contents with the supplied key and initialization vector.

Encrypt the given contents with the supplied key.

Link to this section Functions

Link to this function

decrypt(key, contents, iv) View Source
decrypt(key :: bitstring(), contents :: bitstring(), iv :: bitstring()) ::
  {:ok, unencrypted_result :: binary()} | {:error, reason :: String.t()}

Decrypt the given contents with the supplied key and initialization vector.

Link to this function

encrypt(key, contents) View Source
encrypt(key :: bitstring(), contents :: binary()) ::
  {:ok, {encrypted_result :: bitstring(), initialization_vector :: bitstring()}}
  | {:error, reason :: String.t()}

Encrypt the given contents with the supplied key.