View Source jose_block_encryptor behaviour (JOSE v1.11.10)

Summary

Callbacks

Link to this callback

block_decrypt/3

View Source (optional)
-callback block_decrypt(Cipher, Key, CipherText) -> PlainText | error
                 when
                     Cipher :: {atom(), pos_integer()},
                     Key :: bitstring(),
                     CipherText :: binary(),
                     PlainText :: binary().
-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().
Link to this callback

block_encrypt/3

View Source (optional)
-callback block_encrypt(Cipher, Key, PlainText) -> CipherText
                 when
                     Cipher :: {atom(), pos_integer()},
                     Key :: bitstring(),
                     PlainText :: binary(),
                     CipherText :: binary().
-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()}.