github.com/lestrrat-go/jwx/v2@v2.0.21/jwe/internal/content_crypt/interface.go (about) 1 package content_crypt //nolint:golint 2 3 import ( 4 "github.com/lestrrat-go/jwx/v2/jwa" 5 "github.com/lestrrat-go/jwx/v2/jwe/internal/cipher" 6 ) 7 8 // Generic encrypts a message by applying all the necessary 9 // modifications to the keys and the contents 10 type Generic struct { 11 alg jwa.ContentEncryptionAlgorithm 12 keysize int 13 tagsize int 14 cipher cipher.ContentCipher 15 } 16 17 type Cipher interface { 18 Decrypt([]byte, []byte, []byte, []byte, []byte) ([]byte, error) 19 KeySize() int 20 }