Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESCBCHMACSHA2 ¶
type AESCBCHMACSHA2 struct { Alg string // contains filtered or unexported fields }
AESCBCHMACSHA2 implements AES_CBC_HMAC_SHA2 as defined in https://tools.ietf.org/html/rfc7518#section-5.2.2
func NewAES128CBCHMACSHA256 ¶
func NewAES128CBCHMACSHA256(key []byte) (*AESCBCHMACSHA2, error)
NewAES128CBCHMACSHA256 returns an implementation of AES_128_CBC_HMAC_SHA_256 (https://tools.ietf.org/html/rfc7518#section-5.2.3)
func (*AESCBCHMACSHA2) Decrypt ¶
func (a *AESCBCHMACSHA2) Decrypt(iv, ciphertext, additionalData, tag []byte) ([]byte, error)
func (*AESCBCHMACSHA2) Encrypt ¶
func (a *AESCBCHMACSHA2) Encrypt(iv, plaintext, additionalData []byte) (EncryptResult, error)
type EncryptResult ¶
type EncryptResult struct {
Ciphertext, Tag []byte
}
Click to show internal directories.
Click to hide internal directories.