Streamline the AEAD API

This commit is contained in:
Jesper Louis Andersen
2020-02-05 10:56:18 +01:00
parent b637ba307b
commit c7720e6ab8
4 changed files with 43 additions and 31 deletions
+2 -2
View File
@@ -1152,7 +1152,7 @@ kx_secret_key_size() ->
%% `AD' using `Key' and `Nonce'. Returns the encrypted message followed by
%% `aead_chacha20poly1305_ABYTES/0' bytes of MAC.
%% @end
-spec aead_chacha20poly1305_ietf_encrypt(Msg, AD, Nonce, Key) -> binary() | {error, term()}
-spec aead_chacha20poly1305_ietf_encrypt(Msg, AD, Nonce, Key) -> binary()
when Key :: binary(),
Nonce :: binary(),
AD :: binary(),
@@ -1207,7 +1207,7 @@ aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX() ->
%% `AD' using `Key' and `Nonce'. Returns the encrypted message followed by
%% `aead_xchacha20poly1305_ABYTES/0' bytes of MAC.
%% @end
-spec aead_xchacha20poly1305_ietf_encrypt(Msg, AD, Nonce, Key) -> binary() | {error, term()}
-spec aead_xchacha20poly1305_ietf_encrypt(Msg, AD, Nonce, Key) -> binary()
when Key :: binary(),
Nonce :: binary(),
AD :: binary(),