hmacsha256

package
v0.1.0-beta-007 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignFunc

type SignFunc = func(msg []byte) (signature []byte)

SignFunc computes a signature for a given msg using HMAC-SHA256.

func CreateSignFunc

func CreateSignFunc(key []byte) SignFunc

CreateSignFunc creates a new `hmacsha256.SignFunc` function with the given signing key.

type ValidateFunc

type ValidateFunc = func(msg, signature []byte) (ok bool)

ValidateFunc validates a given msg against the previously computed signature using HMAC-SHA256.

func CreateValidateFunc

func CreateValidateFunc(key []byte) ValidateFunc

CreateValidateFunc creates a new `hmacsha256.ValidateFunc` function with the given signing key.

Jump to

Keyboard shortcuts

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