ntru_elixir v0.0.0 NtruElixir.KeyPair

KeyPair struct

Link to this section Summary

Functions

Creates a new KeyPair struct with given public_key and private_key

Link to this section Types

Link to this type t()
t() :: %NtruElixir.KeyPair{ntru_params: NtruElixir.Base.ntru_params_t(), priv_key: binary(), pub_key: binary()}

Link to this section Functions

Link to this function new(pub_key, ntru_params, priv_key \\ nil)
new(binary(), NtruElixir.Base.ntru_params_t(), binary()) ::
  {:ok, NtruElixir.KeyPair.t()} |
  {:error, :pub_key_type_error} |
  {:error, :bad_keys}

Creates a new KeyPair struct with given public_key and private_key

Parameters

  • pub_key: binary of public key
  • priv_key: binary of private key

Returns a tuple like {:ok, %KeyPair{...}} on success.

Link to this function new!(pub_keys, ntru_params, priv_key)