hmac

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MD5

func MD5(data []byte, key []byte, opts ...Option) []byte

MD5 uses hmac-md5 to hash data and returns an error if failed.

func SHA1

func SHA1(data []byte, key []byte, opts ...Option) []byte

SHA1 uses hmac-sha1 to hash data and returns an error if failed.

func SHA224

func SHA224(data []byte, key []byte, opts ...Option) []byte

SHA224 uses hmac-sha224 to hash data and returns an error if failed.

func SHA256

func SHA256(data []byte, key []byte, opts ...Option) []byte

SHA256 uses hmac-sha256 to hash data and returns an error if failed.

func SHA384

func SHA384(data []byte, key []byte, opts ...Option) []byte

SHA384 uses hmac-sha384 to hash data and returns an error if failed.

func SHA512

func SHA512(data []byte, key []byte, opts ...Option) []byte

SHA512 uses hmac-sha512 to hash data and returns an error if failed.

Types

type Config added in v0.5.2

type Config struct {
	// contains filtered or unexported fields
}

func (*Config) Apply added in v0.5.2

func (c *Config) Apply(opts ...Option) *Config

type Option added in v0.5.2

type Option func(conf *Config)

func WithBase64 added in v0.5.2

func WithBase64() Option

WithBase64 sets base64 encoding to config.

func WithHex added in v0.5.2

func WithHex() Option

WithHex sets hex encoding to config.

Jump to

Keyboard shortcuts

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