jose_block_encryptor behaviour (JOSE v1.11.12)

View Source

Summary

Callbacks

block_decrypt/3

(optional)
-callback block_decrypt(Cipher, Key, CipherText) -> PlainText | error
                           when
                               Cipher :: {atom(), pos_integer()},
                               Key :: bitstring(),
                               CipherText :: binary(),
                               PlainText :: binary().

block_decrypt/4

-callback block_decrypt(Cipher, Key, IV, CipherText) -> PlainText | error
                           when
                               Cipher :: {atom(), pos_integer()},
                               Key :: bitstring(),
                               IV :: bitstring(),
                               CipherText :: binary() | {binary(), binary(), binary()},
                               PlainText :: binary().

block_encrypt/3

(optional)
-callback block_encrypt(Cipher, Key, PlainText) -> CipherText
                           when
                               Cipher :: {atom(), pos_integer()},
                               Key :: bitstring(),
                               PlainText :: binary(),
                               CipherText :: binary().

block_encrypt/4

-callback block_encrypt(Cipher, Key, IV, PlainText) -> CipherText
                           when
                               Cipher :: {atom(), pos_integer()},
                               Key :: bitstring(),
                               IV :: bitstring(),
                               PlainText :: binary() | {binary(), binary()},
                               CipherText :: binary() | {binary(), binary()}.