defmodule Gblake3 do @moduledoc """ B3 wrapper for Gblake3 """ @doc """ Wrapper for the B3.hash method with the keyword :length specified. Length is the number of bytes to output """ @spec hash_len(binary(), integer()) :: binary() def hash_len(message, length) do B3.hash(message, length: length) end @doc """ Wrapper for the B3.keyed_hash method with the keyword :length specified. Length is the number of bytes to output """ @spec keyed_hash_to_length(binary(), binary(), integer()) :: binary() def keyed_hash_to_length(message, key, length) do B3.keyed_hash(message, key, length: length) end @doc """ Wrapper for the B3.derive_key method with the keyword :length specified. Length is the number of bytes to output """ @spec derive_key_len(binary(), binary(), integer()) :: binary() def derive_key_len(key_material, context, length) do B3.derive_key(key_material, context, length: length) end end