minisign

package module
v0.0.0-...-661be99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 6 Imported by: 240

README

go-minisign

A Golang library to verify Minisign signatures.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicKey

type PublicKey struct {
	SignatureAlgorithm [2]byte
	KeyId              [8]byte
	PublicKey          [32]byte
}

func DecodePublicKey

func DecodePublicKey(in string) (PublicKey, error)

func NewPublicKey

func NewPublicKey(publicKeyStr string) (PublicKey, error)

func NewPublicKeyFromFile

func NewPublicKeyFromFile(file string) (PublicKey, error)

func (*PublicKey) Verify

func (publicKey *PublicKey) Verify(bin []byte, signature Signature) (bool, error)

func (*PublicKey) VerifyFromFile

func (publicKey *PublicKey) VerifyFromFile(file string, signature Signature) (bool, error)

type Signature

type Signature struct {
	UntrustedComment   string
	SignatureAlgorithm [2]byte
	KeyId              [8]byte
	Signature          [64]byte
	TrustedComment     string
	GlobalSignature    [64]byte
}

func DecodeSignature

func DecodeSignature(in string) (Signature, error)

func NewSignatureFromFile

func NewSignatureFromFile(file string) (Signature, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL