Current section
Files
Jump to
Current section
Files
src/bindings@blake2.erl
-module(bindings@blake2).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([hash2b/2]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
-file("src/bindings/blake2.gleam", 13).
?DOC(
" Blake2b hashing\n"
"\n"
" Note that the `output_size` is in bytes, not bits\n"
"\n"
" - 64 => Blake2b-512 (default)\n"
" - 48 => Blake2b-384\n"
" - 32 => Blake2b-256\n"
"\n"
" Per the specification, any `output_size` between 1 and 64 bytes is supported.\n"
).
-spec hash2b(bitstring(), integer()) -> bitstring().
hash2b(M, Output_size) ->
'Elixir.Blake2':hash2b(M, Output_size).