block

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AES128KeySize

func AES128KeySize() int

AES128KeySize returns the AES-128 key size in bytes.

func AES256KeySize

func AES256KeySize() int

AES256KeySize returns the AES-256 key size in bytes.

func AESBlockSize

func AESBlockSize() int

AESBlockSize returns the AES block size in bytes.

Types

type Cipher

type Cipher interface {
	BlockSize() int
	Encrypt(dst, src []byte)
	Decrypt(dst, src []byte)
}

Cipher represents a raw block cipher with fixed-size blocks.

func NewAES128

func NewAES128(key []byte) (Cipher, error)

NewAES128 returns an AES-128 block cipher implementing Cipher.

func NewAES256

func NewAES256(key []byte) (Cipher, error)

NewAES256 returns an AES-256 block cipher implementing Cipher.

Jump to

Keyboard shortcuts

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