crypto

package
v0.0.0-...-a0b1be5 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

type Crypto interface {
	Name() string
	Sign(msg string, secret string) ([]byte, error)
}

Crypto interface for signing algorithm

type HmacSha256

type HmacSha256 struct{}

HmacSha256 signing algorithm using hmac and sha256

func (*HmacSha256) Name

func (h *HmacSha256) Name() string

Name return name of algorithm

func (*HmacSha256) Sign

func (h *HmacSha256) Sign(msg string, secret string) ([]byte, error)

Sign return signing of input msg with secret string

type HmacSha512

type HmacSha512 struct{}

HmacSha512 signing algorithm using hmac and sha512

func (*HmacSha512) Name

func (h *HmacSha512) Name() string

Name return name of algorithm

func (*HmacSha512) Sign

func (h *HmacSha512) Sign(msg string, secret string) ([]byte, error)

Sign return signing of input msg with secret string

Jump to

Keyboard shortcuts

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