jose_jwe_enc behaviour (JOSE v1.11.12)

View Source

Summary

Callbacks

algorithm/1

(optional)
-callback algorithm(ENC) -> Algorithm when ENC :: any(), Algorithm :: iodata().

bits/1

(optional)
-callback bits(ENC) -> Bits when ENC :: any(), Bits :: non_neg_integer().

block_decrypt/4

-callback block_decrypt({AAD, CipherText, CipherTag}, CEK, IV, ENC) -> PlainText | error
                           when
                               AAD :: iodata(),
                               CipherText :: iodata(),
                               CipherTag :: iodata(),
                               CEK :: iodata(),
                               IV :: iodata(),
                               ENC :: any(),
                               PlainText :: iodata().

block_encrypt/4

-callback block_encrypt({AAD, PlainText}, CEK, IV, ENC) -> {CipherText, CipherTag}
                           when
                               AAD :: iodata(),
                               PlainText :: iodata(),
                               CEK :: iodata(),
                               IV :: iodata(),
                               ENC :: any(),
                               CipherText :: iodata(),
                               CipherTag :: iodata().

next_cek/1

-callback next_cek(ENC) -> CEK when ENC :: any(), CEK :: iodata().

next_iv/1

-callback next_iv(ENC) -> IV when ENC :: any(), IV :: iodata().