encrypt

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWorkModeNotSupport = errors.New("work mode not support ")
)

Functions

func HmacSHA1

func HmacSHA1(msg string, key string) (string, error)

func HmacSHA256

func HmacSHA256(msg string, key string) (string, error)

func MD5

func MD5(msg string) (string, error)

func NewAES added in v0.0.4

func NewAES(mode Mode) *aseHelper

func NewRSA

func NewRSA() *rsaHelper

func SHA1

func SHA1(msg string) (string, error)

Types

type Mode added in v0.0.4

type Mode uint8
const (
	// block encrypt
	CBC Mode = 1 + iota
	ECB
	CTR

	// stream encrypt
	CFB
	OFB
)

Jump to

Keyboard shortcuts

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