type Cipher interface { Decrypt([]byte, []byte, []byte, []byte, []byte) ([]byte, error) KeySize() int }
Generic encrypts a message by applying all the necessary modifications to the keys and the contents
type Generic struct {
// contains filtered or unexported fields
}
func NewGeneric(alg jwa.ContentEncryptionAlgorithm) (*Generic, error)
func (c Generic) Algorithm() jwa.ContentEncryptionAlgorithm
func (c Generic) Decrypt(cek, iv, ciphertext, tag, aad []byte) ([]byte, error)
func (c Generic) Encrypt(cek, plaintext, aad []byte) ([]byte, []byte, []byte, error)
func (c Generic) KeySize() int