cryptoutils

package
v0.0.0-...-6797358 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESBase

type AESBase struct{}

func (AESBase) PKCS7Padding

func (AESBase) PKCS7Padding(ciphertext []byte, blockSize int) []byte

func (AESBase) PKCS7UnPadding

func (AESBase) PKCS7UnPadding(origData []byte) []byte

type AESCBC

type AESCBC struct {
	AESBase
	// contains filtered or unexported fields
}

func NewAESCBC

func NewAESCBC(key []byte) AESCBC

Symmetric key length must be a multiple of 16

func NewAESCBCMd5Key

func NewAESCBCMd5Key(key string) AESCBC

Symmetric key length must be a multiple of 16

func (AESCBC) Decrypt

func (s AESCBC) Decrypt(cryptedData []byte) ([]byte, error)

func (AESCBC) DecryptStr

func (s AESCBC) DecryptStr(cryptedData string) (string, error)

func (AESCBC) Encrypt

func (s AESCBC) Encrypt(originalData []byte) ([]byte, error)

func (AESCBC) EncryptStr

func (s AESCBC) EncryptStr(originalData string) (string, error)

Jump to

Keyboard shortcuts

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