aespkg

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptCBC

func DecryptCBC(rawData string, key []byte) (res string, err error)

DecryptCBC CBC模式解密

func EncryptCBC

func EncryptCBC(rawData, key []byte) (res string, err error)

EncryptCBC CBC模式加密

Types

type AESEncryptor

type AESEncryptor interface {
	EncryptToString(plaintext, key string) (string, error)
	DecryptToString(ciphertext, key string) (string, error)
}

AESEncryptor ...

func NewCBCCipher

func NewCBCCipher() AESEncryptor

type Encryptor

type Encryptor interface {
	EncryptToString(plaintext string) (string, error)
	DecryptToString(ciphertext string) (string, error)
}

Encryptor ...

func NewAesCipher

func NewAesCipher(key []byte) (Encryptor, error)

NewAesCipher aes加解密

Jump to

Keyboard shortcuts

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