cryptlib

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptDESECB

func DecryptDESECB(d string, key []byte) (string, error)

func DecryptDESECBByte added in v0.2.1

func DecryptDESECBByte(d string, key []byte) ([]byte, error)

func EntryptDesECB

func EntryptDesECB(data, key []byte) (string, error)

func EntryptDesECBByte added in v0.2.1

func EntryptDesECBByte(data, key []byte) ([]byte, error)

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

Types

type AES

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

func NewAes

func NewAes(initvector []byte) *AES

func (*AES) Decrypt added in v0.2.5

func (aestool *AES) Decrypt(value []byte, key string) []byte

func (*AES) DecryptBase64

func (aestool *AES) DecryptBase64(value, key string) string

func (*AES) DecryptWithHex

func (aestool *AES) DecryptWithHex(value, key string) string

func (*AES) Encrypt

func (aestool *AES) Encrypt(key, value []byte) ([]byte, error)

func (*AES) EncryptBase64

func (aestool *AES) EncryptBase64(key, value []byte) (string, error)

func (*AES) EncryptHex

func (aestool *AES) EncryptHex(key, value []byte) (string, error)

func (*AES) ResetVector

func (aestool *AES) ResetVector(vector []byte)

Jump to

Keyboard shortcuts

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