Minisign.PublicKey (minisign v0.1.1)

Summary

Functions

Public key datastructure for minisign.

parses a public key string. Note that the untrusted comment field is considered optional, as many sources will include a public key as a simple base64 hash with no comment.

parses a public key string, or raises if the string is not a public key representation

Types

@type t() :: %Minisign.PublicKey{algorithm: :Ed, key: <<_::256>>, key_id: <<_::8>>}

Functions

Link to this function

%Minisign.PublicKey{}

(struct)

Public key datastructure for minisign.

fields:

  • :algorithm: always :Ed
  • :key_id: 8 byte key id
  • :key: 32 byte public key

see https://jedisct1.github.io/minisign/#public-key-format

@spec parse(String.t()) :: {:ok, t()} | {:error, Minisign.ParseError.t()}

parses a public key string. Note that the untrusted comment field is considered optional, as many sources will include a public key as a simple base64 hash with no comment.

@spec parse!(String.t()) :: t()

parses a public key string, or raises if the string is not a public key representation

see parse/1