crypto

package
v5.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AES_BLOCK_SIZE = 16
)

Variables

This section is empty.

Functions

func Md5

func Md5(data []byte) []byte

Types

type AesCBCCrypter

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

func NewAesCBCCrypter

func NewAesCBCCrypter(key []byte, iv []byte) (*AesCBCCrypter, error)

func (*AesCBCCrypter) BlockSize

func (this *AesCBCCrypter) BlockSize() int

func (*AesCBCCrypter) Decrypt

func (this *AesCBCCrypter) Decrypt(crypted []byte) []byte

func (*AesCBCCrypter) Encrypt

func (this *AesCBCCrypter) Encrypt(data []byte) []byte

func (*AesCBCCrypter) SetPadding

func (this *AesCBCCrypter) SetPadding(padding PaddingInterface)

type PKCS5Padding

type PKCS5Padding struct {
	BlockSize int
}

func (*PKCS5Padding) Padding

func (this *PKCS5Padding) Padding(data []byte) []byte

func (*PKCS5Padding) UnPadding

func (this *PKCS5Padding) UnPadding(data []byte) []byte

type PaddingInterface

type PaddingInterface interface {
	Padding(data []byte) []byte
	UnPadding(data []byte) []byte
}

Jump to

Keyboard shortcuts

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