Documentation ¶
Overview ¶
This package implements AES encryption (formerly Rijndael), as defined in U.S. Federal Information Processing Standards Publication 197.
Index ¶
Constants ¶
View Source
const BlockSize = 16
The AES block size in bytes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
A Cipher is an instance of AES encryption using a particular key.
func NewCipher ¶
NewCipher creates and returns a new Cipher. The key argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func (*Cipher) BlockSize ¶
BlockSize returns the AES block size, 16 bytes. It is necessary to satisfy the Cipher interface in the package "crypto/block".
func (*Cipher) Decrypt ¶
Decrypt decrypts the 16-byte buffer src using the key k and stores the result in dst.
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) String ¶
func (k KeySizeError) String() string
Click to show internal directories.
Click to hide internal directories.