aes

package
v0.0.0-...-6391c25 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IVParameter []byte

Functions

func GenerateUserKey

func GenerateUserKey(bs []byte) []byte

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

Types

type BlockReader

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

func NewBlockReader

func NewBlockReader(data []byte) *BlockReader

func (*BlockReader) Read

func (br *BlockReader) Read(p []byte) (n int, err error)

type EncryptedBlock

type EncryptedBlock struct {
	DATA      []byte
	KEU       []byte
	KeyNumber int32
}

func NewEncryptedBlock

func NewEncryptedBlock(bs []byte) *EncryptedBlock

func (*EncryptedBlock) Decode

func (self *EncryptedBlock) Decode(key *Key, writer io.Writer) error

func (*EncryptedBlock) Decrypt

func (self *EncryptedBlock) Decrypt(key *Key) ([]byte, error)

func (*EncryptedBlock) ToBytes

func (self *EncryptedBlock) ToBytes() []byte

type Key

type Key struct {
	PrivateKey string
	KeyNumber  uint32
	AESKey     []byte
}

func NewKey

func NewKey(privkey string, number uint32) (*Key, error)

func (*Key) Decrypt

func (self *Key) Decrypt(data []byte) []byte

func (*Key) ECBDecryptNoPad

func (self *Key) ECBDecryptNoPad(data []byte) []byte

func (*Key) ECCDecrypt

func (self *Key) ECCDecrypt(data []byte) []byte

Jump to

Keyboard shortcuts

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