Documentation ¶
Index ¶
- Variables
- func GenerateRandomBytes(size int) ([]byte, error)
- func IvSizeEquality(length, blocksize int) (err error)
- func ValidBlockSize(length int) error
- func ValidCiphertext(length, blocksize int) error
- func ValidIvSize(length int) error
- func ValidKeySize(length int) error
- type BlockSizeError
- type EmptyDataError
- type GCMDataSizeError
- type GCMStdNonceSizeError
- type GCMTagSizeError
- type InvalidCiphertextError
- type InvalidDataError
- type IvSizeEqualityError
- type IvSizeError
- type KeySizeError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CBC cbc // CBC (Cipher Block Chaining): Encrypts each block of plaintext with XOR chaining to the previous ciphertext block. CFB cfb // CFB (Cipher Feedback): Encrypts an IV and XORs it with plaintext segments, turning AES into a self-synchronizing stream cipher. CTR ctr // CTR (Counter): Encrypts a counter value and XORs it with plaintext, effectively turning AES into a stream cipher. ECB ecb // ECB (Electronic Codebook): Encrypts each block of plaintext independently. GCM gcm // GCM (Galois/Counter Mode): Combines CTR mode encryption with Galois mode for authentication, providing confidentiality and integrity. OFB ofb // OFB (Output Feedback): Encrypts an IV to create a keystream, XORed with plaintext to produce ciphertext, making AES a stream cipher. )
Functions ¶
func GenerateRandomBytes ¶
func IvSizeEquality ¶
func ValidBlockSize ¶
func ValidCiphertext ¶ added in v1.10.0
func ValidIvSize ¶
func ValidKeySize ¶
Types ¶
type BlockSizeError ¶
type BlockSizeError int
func (BlockSizeError) Error ¶
func (i BlockSizeError) Error() string
type EmptyDataError ¶
type EmptyDataError int
type GCMDataSizeError ¶
type GCMDataSizeError int
func (GCMDataSizeError) Error ¶
func (i GCMDataSizeError) Error() string
type GCMStdNonceSizeError ¶
type GCMStdNonceSizeError int
func (GCMStdNonceSizeError) Error ¶
func (i GCMStdNonceSizeError) Error() string
type GCMTagSizeError ¶
type GCMTagSizeError int
func (GCMTagSizeError) Error ¶
func (i GCMTagSizeError) Error() string
type InvalidCiphertextError ¶ added in v1.10.0
type InvalidCiphertextError int
func (InvalidCiphertextError) Error ¶ added in v1.10.0
func (i InvalidCiphertextError) Error() string
type InvalidDataError ¶
type InvalidDataError int
func (InvalidDataError) Error ¶
func (i InvalidDataError) Error() string
type IvSizeEqualityError ¶
type IvSizeEqualityError int
func (IvSizeEqualityError) Error ¶
func (i IvSizeEqualityError) Error() string
type IvSizeError ¶
type IvSizeError int
func (IvSizeError) Error ¶
func (i IvSizeError) Error() string
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
Click to show internal directories.
Click to hide internal directories.