test

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(crypted, key []byte) (result []byte, err error)

func Encrypt

func Encrypt(origData, key []byte) (result []byte, err error)

func NewProtocol

func NewProtocol() protocol.Protocol

func PKCS5Padding

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

func PKCS5Unpadding

func PKCS5Unpadding(origData []byte) []byte

Types

type MyCryptor

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

func NewCryptor

func NewCryptor(key []byte) *MyCryptor

func (*MyCryptor) Decrypt

func (d *MyCryptor) Decrypt(orig []byte) (result []byte, err error)

func (*MyCryptor) Encrypt

func (d *MyCryptor) Encrypt(orig []byte) (result []byte, err error)

Jump to

Keyboard shortcuts

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