cryptocommon

package
v0.0.0-...-084929d Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ECB = "ecb"
	CBC = "cbc"
	CTR = "ctr"
	CFB = "cfb"
	OFB = "ofb"
)

Variables

View Source
var (
	ErrOption        = errors.New("配置错误")
	ErrNotFindCrypto = errors.New("无法找到加密器")
)
View Source
var Salt []byte

默认盐值

Functions

This section is empty.

Types

type CryptoOption

type CryptoOption struct {
	K1     []byte // 密码、密钥
	K2     []byte // 偏移、随机数、私钥密码
	Mode   string // 加密模式
	Length int    // 长度
}

type CryptoPlugin

type CryptoPlugin interface {
	Encrypt(in []byte) (out []byte)
	Decrypt(in []byte) (out []byte)
}

* * 加密插件

Jump to

Keyboard shortcuts

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