cipher

package
v1.0.1050 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCCM

func NewCCM(cipher goCipher.Block) (goCipher.AEAD, error)

NewCCM returns the given 128-bit, block cipher wrapped in CCM with the standard nonce length.

func NewCCMWithNonceAndTagSize

func NewCCMWithNonceAndTagSize(cipher goCipher.Block, nonceSize, tagSize int) (goCipher.AEAD, error)

https://tools.ietf.org/html/rfc3610

func NewCCMWithNonceSize

func NewCCMWithNonceSize(cipher goCipher.Block, size int) (goCipher.AEAD, error)

NewCCMWithNonceSize returns the given 128-bit, block cipher wrapped in CCM, which accepts nonces of the given length. The length must not be zero.

func NewCCMWithTagSize

func NewCCMWithTagSize(cipher goCipher.Block, tagSize int) (goCipher.AEAD, error)

NewCCMWithTagSize returns the given 128-bit, block cipher wrapped in CCM, which generates tags with the given length.

Tag sizes between 8 and 16 bytes are allowed.

func NewCFB8

func NewCFB8(block cipher.Block, iv []byte, decrypt bool) cipher.Stream

func NewCFB8Decrypter

func NewCFB8Decrypter(block cipher.Block, iv []byte) cipher.Stream

NewCFB8Decrypter returns a Stream which decrypts with cipher feedback mode (segment size = 8), using the given Block. The iv must be the same length as the Block's block size.

func NewCFB8Encrypter

func NewCFB8Encrypter(block cipher.Block, iv []byte) cipher.Stream

NewCFB8Encrypter returns a Stream which encrypts with cipher feedback mode (segment size = 8), using the given Block. The iv must be the same length as the Block's block size.

func NewECBDecrypter added in v1.0.1048

func NewECBDecrypter(b cipher.Block) cipher.BlockMode

NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.

func NewECBEncrypter added in v1.0.1048

func NewECBEncrypter(b cipher.Block) cipher.BlockMode

NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.

func NewOFB8

func NewOFB8(b cipher.Block, iv []byte) cipher.Stream

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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