crypto

package
v0.0.0-...-6e49935 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PKCS7Padding

func PKCS7Padding(b []byte, blockSize int) []byte

func PKCS7PaddingString

func PKCS7PaddingString(str string, blockSize int) []byte

func PKCS7Unpadding

func PKCS7Unpadding(b []byte) []byte

Types

type AESDecrypter

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

func NewAESDecrypter

func NewAESDecrypter(key []byte) (*AESDecrypter, error)

CBC模式/PKCS7Padding

func (*AESDecrypter) Decrypt

func (this *AESDecrypter) Decrypt(b []byte) []byte

func (*AESDecrypter) DecryptToString

func (this *AESDecrypter) DecryptToString(b []byte) string

type AESEncrypter

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

func NewAESEncrypter

func NewAESEncrypter(key []byte) (*AESEncrypter, error)

CBC模式/PKCS7Padding

func (*AESEncrypter) Encrypt

func (this *AESEncrypter) Encrypt(b []byte) []byte

func (*AESEncrypter) EncryptString

func (this *AESEncrypter) EncryptString(str string) []byte

Jump to

Keyboard shortcuts

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