Fix rebar3 edoc
compilation
This commit is contained in:
parent
fb7de2cbb4
commit
8b8ceff4ef
@ -292,7 +292,7 @@ unsafe_memzero(_) ->
|
|||||||
%% This function generates a hash of the message using a key. The hash size is
|
%% This function generates a hash of the message using a key. The hash size is
|
||||||
%% either 16, 32 or 64 bytes
|
%% either 16, 32 or 64 bytes
|
||||||
%% @end
|
%% @end
|
||||||
-type generichash_bytes() :: ?CRYPTO_GENERICHASH_BYTES_MIN..?CRYPTO_GENERICHASH_BYTES_MAX.
|
-type generichash_bytes() :: 10..64.
|
||||||
-spec generichash(generichash_bytes(), iodata(), binary()) -> {ok, binary()} | {error, term()}.
|
-spec generichash(generichash_bytes(), iodata(), binary()) -> {ok, binary()} | {error, term()}.
|
||||||
generichash(HashSize, Message, Key) ->
|
generichash(HashSize, Message, Key) ->
|
||||||
enacl_nif:crypto_generichash(HashSize, Message, Key).
|
enacl_nif:crypto_generichash(HashSize, Message, Key).
|
||||||
@ -1014,9 +1014,9 @@ kx_secret_key_size() ->
|
|||||||
|
|
||||||
%% AEAD ChaCha20 Poly1305
|
%% AEAD ChaCha20 Poly1305
|
||||||
%% ----------------------
|
%% ----------------------
|
||||||
%% @doc aead_chacha20poly1305_encrypt/4 encrypts `Message` with additional data
|
%% @doc aead_chacha20poly1305_encrypt/4 encrypts `Message' with additional data
|
||||||
%% `AD` using `Key` and `Nonce`. Returns the encrypted message followed by
|
%% `AD' using `Key' and `Nonce'. Returns the encrypted message followed by
|
||||||
%% `aead_chacha20poly1305_ABYTES/0` bytes of MAC.
|
%% `aead_chacha20poly1305_ABYTES/0' bytes of MAC.
|
||||||
%% @end
|
%% @end
|
||||||
-spec aead_chacha20poly1305_encrypt(Key, Nonce, AD, Msg) -> binary() | {error, term()}
|
-spec aead_chacha20poly1305_encrypt(Key, Nonce, AD, Msg) -> binary() | {error, term()}
|
||||||
when Key :: binary(),
|
when Key :: binary(),
|
||||||
@ -1027,9 +1027,9 @@ aead_chacha20poly1305_encrypt(Key, Nonce, AD, Msg) ->
|
|||||||
NonceBin = <<0:32, Nonce:64/little-unsigned-integer>>,
|
NonceBin = <<0:32, Nonce:64/little-unsigned-integer>>,
|
||||||
enacl_nif:crypto_aead_chacha20poly1305_encrypt(Key, NonceBin, AD, Msg).
|
enacl_nif:crypto_aead_chacha20poly1305_encrypt(Key, NonceBin, AD, Msg).
|
||||||
|
|
||||||
%% @doc aead_chacha20poly1305_decrypt/4 decrypts ciphertext `CT` with additional
|
%% @doc aead_chacha20poly1305_decrypt/4 decrypts ciphertext `CT' with additional
|
||||||
%% data `AD` using `Key` and `Nonce`. Note: `CipherText` should contain
|
%% data `AD' using `Key' and `Nonce'. Note: `CipherText' should contain
|
||||||
%% `aead_chacha20poly1305_ABYTES/0` bytes that is the MAC. Returns the decrypted
|
%% `aead_chacha20poly1305_ABYTES/0' bytes that is the MAC. Returns the decrypted
|
||||||
%% message.
|
%% message.
|
||||||
%% @end
|
%% @end
|
||||||
-spec aead_chacha20poly1305_decrypt(Key, Nonce, AD, CT) -> binary() | {error, term()}
|
-spec aead_chacha20poly1305_decrypt(Key, Nonce, AD, CT) -> binary() | {error, term()}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user