sig

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compute

func Compute(hasher HashFactory, key []byte, msg []byte) []byte

Compute calculates a signature for a given hashing function, key and message.

func ComputeSHA256

func ComputeSHA256(key, msg []byte) []byte

ComputeSHA256 calculates a signature for a given key and message.

func Validate

func Validate(hasher HashFactory, key, msg, signature []byte) bool

Validate verifies an existing signature against a given hashing function, key and message.

func ValidateSHA256

func ValidateSHA256(key, msg, signature []byte) bool

ValidateSHA256 verifies an existing signature against a given key and message.

Types

type HashFactory

type HashFactory = func() hash.Hash

HashFactory creates a new Hash.

Jump to

Keyboard shortcuts

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