Documentation ¶
Overview ¶
Package subtle provides subtle implementations of the AEAD primitive.
Index ¶
Constants ¶
View Source
const ( // AES128Size value in number of bytes. AES128Size = 16 // AES192Size value in number of bytes. AES192Size = 24 // AES256Size value in number of bytes. AES256Size = 32 )
View Source
const (
// AESCBCIVSize is the IV size that this implementation supports.
AESCBCIVSize = 16
)
Variables ¶
This section is empty.
Functions ¶
func ValidateAESKeySize ¶
ValidateAESKeySize checks if the given key size is a valid AES key size.
func ValidateAESKeySizeForGoJose ¶
ValidateAESKeySizeForGoJose checks if the given key size is a valid AES key size.
Types ¶
type AESCBC ¶
type AESCBC struct {
Key []byte
}
AESCBC is an implementation of AEAD interface.
func NewAESCBC ¶
NewAESCBC returns an AESCBC instance. The key argument should be the AES key, either 16, 24 or 32 bytes to select AES-128, AES-192 or AES-256.
type AESCBCHMAC ¶
type AESCBCHMAC struct {
Key []byte
}
AESCBCHMAC is an implementation of AEAD interface.
func NewAESCBCHMAC ¶
func NewAESCBCHMAC(key []byte) (*AESCBCHMAC, error)
NewAESCBCHMAC returns an AES CBC HMAC instance. The key argument should be the AES key, either 16, 24 or 32 bytes to select AES-128, AES-192 or AES-256. ivSize specifies the size of the IV in bytes.
Click to show internal directories.
Click to hide internal directories.