cipher

package
v0.0.0-...-6bcf8dd Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewECBDecrypter

func NewECBDecrypter(block cipher.Block) cipher.BlockMode

func NewECBEncrypter

func NewECBEncrypter(block cipher.Block) cipher.BlockMode

Types

type Cipher

type Cipher interface {
	Encrypt(src []byte) []byte
	Decrypt(src []byte) []byte
}

func NewBlockCipher

func NewBlockCipher(padding Padding, encrypt, decrypt cipher.BlockMode) Cipher

type CipherMode

type CipherMode interface {
	SetPadding(padding Padding) CipherMode

	Cipher(block cipher.Block, iv []byte) Cipher
}

func NewCBCMode

func NewCBCMode() CipherMode

func NewECBMode

func NewECBMode() CipherMode

type Padding

type Padding interface {
	Padding(src []byte, blockSize int) []byte

	UnPadding(src []byte) []byte
}

func NewPKCSPadding

func NewPKCSPadding() Padding

func NewZeroPadding

func NewZeroPadding() Padding

Jump to

Keyboard shortcuts

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