cipher

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const (
	FilenameCommonCipherKey = "awesome_libs_cipher_common"
	HintInitData            = "Hint: you need init your data, because the CommonCipher's key is init key."
)
View Source
const (
	PanicKeyMustExists = "the cipher's key must be exists"
)

Variables

View Source
var CommonCipher = Cipher{}
View Source
var IsInitKey bool

Functions

func Init added in v0.4.8

func Init()

Types

type Cipher

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

func GetCipher added in v0.4.7

func GetCipher(key []byte) Cipher

Do not remove it.

func (*Cipher) Decrypt

func (c *Cipher) Decrypt(ct string) ([]byte, error)

func (*Cipher) Encrypt

func (c *Cipher) Encrypt(plainText []byte) (string, error)

func (*Cipher) GetKey

func (c *Cipher) GetKey(keyPath string) error

func (*Cipher) MustKeyExists

func (c *Cipher) MustKeyExists()

func (*Cipher) SetKey

func (c *Cipher) SetKey(key []byte)

Jump to

Keyboard shortcuts

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