PBCS.AES_CBC_HMAC_SHA2 (pbcs v0.1.4) View Source

Content Encryption with AES_CBC_HMAC_SHA2.

See: https://tools.ietf.org/html/rfc7518#section-5.2.6

Link to this section Summary

Link to this section Functions

Link to this function

content_decrypt(arg, key, iv)

View Source

Specs

content_decrypt({binary(), PBCS.cipher_text(), PBCS.tag()}, binary(), binary()) ::
  {:ok, PBCS.plain_text()} | :error
Link to this function

content_encrypt(arg, key, iv)

View Source

Specs

content_encrypt({binary(), PBCS.plain_text()}, binary(), binary()) ::
  {PBCS.cipher_text(), binary()}
Link to this function

decrypt(map, key, iv, arg)

View Source

Callback implementation for PBCS.ContentEncryptor.decrypt/4.

Link to this function

encrypt(map, key, iv, arg)

View Source

Callback implementation for PBCS.ContentEncryptor.encrypt/4.

Callback implementation for PBCS.ContentEncryptor.generate_iv/1.

Callback implementation for PBCS.ContentEncryptor.generate_key/1.

Callback implementation for PBCS.ContentEncryptor.init/2.

Callback implementation for PBCS.ContentEncryptor.key_length/1.