Minisign.Signature (minisign v0.1.1)

Datastructure representing a minisign signature.

fields:

  • :algorithm: always :ED (note the capitalization)
  • :trusted_comment: (string) the trusted comment
  • :key_id: (binary) 8 byte key id
  • :signature: (binary) 64 byte signature
  • :global_signature: (binary) 64 byte global signature

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

Summary

Functions

parses a signature string, and returns the resulting struct if it's valid.

parses a signature string, or raises if the string is not a signature representation

Types

@type t() :: %Minisign.Signature{
  algorithm: :Ed,
  global_signature: <<_::256>>,
  key_id: <<_::8>>,
  signature: <<_::256>>,
  trusted_comment: String.t()
}

Functions

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

parses a signature string, and returns the resulting struct if it's valid.

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

parses a signature string, or raises if the string is not a signature representation

see parse/1