github.com/lestrrat-go/jwx/v2@v2.0.21/jwe/options.yaml (about) 1 package_name: jwe 2 output: jwe/options_gen.go 3 interfaces: 4 - name: GlobalOption 5 comment: | 6 GlobalOption describes options that changes global settings for this package 7 - name: GlobalDecryptOption 8 comment: | 9 GlobalDecryptOption describes options that changes global settings and for each call of the `jwe.Decrypt` function 10 methods: 11 - globalOption 12 - decryptOption 13 - name: CompactOption 14 comment: | 15 CompactOption describes options that can be passed to `jwe.Compact` 16 - name: DecryptOption 17 comment: | 18 DecryptOption describes options that can be passed to `jwe.Decrypt` 19 - name: EncryptOption 20 comment: | 21 EncryptOption describes options that can be passed to `jwe.Encrypt` 22 - name: EncryptDecryptOption 23 methods: 24 - encryptOption 25 - decryptOption 26 comment: | 27 EncryptDecryptOption describes options that can be passed to either `jwe.Encrypt` or `jwe.Decrypt` 28 - name: WithJSONSuboption 29 concrete_type: withJSONSuboption 30 comment: | 31 JSONSuboption describes suboptions that can be passed to `jwe.WithJSON()` option 32 - name: WithKeySetSuboption 33 comment: | 34 WithKeySetSuboption is a suboption passed to the WithKeySet() option 35 - name: ParseOption 36 methods: 37 - readFileOption 38 comment: | 39 ReadFileOption is a type of `Option` that can be passed to `jwe.Parse` 40 - name: ReadFileOption 41 comment: | 42 ReadFileOption is a type of `Option` that can be passed to `jwe.ReadFile` 43 options: 44 - ident: Key 45 skip_option: true 46 - ident: Pretty 47 skip_option: true 48 - ident: ProtectedHeaders 49 skip_option: true 50 - ident: PerRecipientHeaders 51 skip_option: true 52 - ident: KeyProvider 53 interface: DecryptOption 54 argument_type: KeyProvider 55 - ident: Serialization 56 option_name: WithCompact 57 interface: EncryptOption 58 constant_value: fmtCompact 59 comment: | 60 WithCompact specifies that the result of `jwe.Encrypt()` is serialized in 61 compact format. 62 63 By default `jwe.Encrypt()` will opt to use compact format, so you usually 64 do not need to specify this option other than to be explicit about it 65 - ident: Compress 66 interface: EncryptOption 67 argument_type: jwa.CompressionAlgorithm 68 comment: | 69 WithCompress specifies the compression algorithm to use when encrypting 70 a payload using `jwe.Encrypt` (Yes, we know it can only be "" or "DEF", 71 but the way the specification is written it could allow for more options, 72 and therefore this option takes an argument) 73 - ident: ContentEncryptionAlgorithm 74 interface: EncryptOption 75 option_name: WithContentEncryption 76 argument_type: jwa.ContentEncryptionAlgorithm 77 comment: | 78 WithContentEncryptionAlgorithm specifies the algorithm to encrypt the 79 JWE message content with. If not provided, `jwa.A256GCM` is used. 80 - ident: Message 81 interface: DecryptOption 82 argument_type: '*Message' 83 comment: | 84 WithMessage provides a message object to be populated by `jwe.Decrpt` 85 Using this option allows you to decrypt AND obtain the `jwe.Message` 86 in one go. 87 88 Note that you should NOT be using the message object for anything other 89 than inspecting its contents. Particularly, do not expect the message 90 reliable when you call `Decrypt` on it. `(jwe.Message).Decrypt` is 91 slated to be deprecated in the next major version. 92 - ident: RequireKid 93 interface: WithKeySetSuboption 94 argument_type: bool 95 comment: | 96 WithrequiredKid specifies whether the keys in the jwk.Set should 97 only be matched if the target JWE message's Key ID and the Key ID 98 in the given key matches. 99 - ident: Pretty 100 interface: WithJSONSuboption 101 argument_type: bool 102 comment: | 103 WithPretty specifies whether the JSON output should be formatted and 104 indented 105 - ident: MergeProtectedHeaders 106 interface: EncryptOption 107 argument_type: bool 108 comment: | 109 WithMergeProtectedHeaders specify that when given multiple headers 110 as options to `jwe.Encrypt`, these headers should be merged instead 111 of overwritten 112 - ident: FS 113 interface: ReadFileOption 114 argument_type: fs.FS 115 comment: | 116 WithFS specifies the source `fs.FS` object to read the file from. 117 - ident: KeyUsed 118 interface: DecryptOption 119 argument_type: 'interface{}' 120 comment: | 121 WithKeyUsed allows you to specify the `jwe.Decrypt()` function to 122 return the key used for decryption. This may be useful when 123 you specify multiple key sources or if you pass a `jwk.Set` 124 and you want to know which key was successful at decrypting the 125 signature. 126 127 `v` must be a pointer to an empty `interface{}`. Do not use 128 `jwk.Key` here unless you are 100% sure that all keys that you 129 have provided are instances of `jwk.Key` (remember that the 130 jwx API allows users to specify a raw key such as *rsa.PublicKey) 131 - ident: CEK 132 interface: DecryptOption 133 argument_type: '*[]byte' 134 comment: | 135 WithCEK allows users to specify a variable to store the CEK used in the 136 message upon successful decryption. The variable must be a pointer to 137 a byte slice, and it will only be populated if the decryption is successful. 138 139 This option is currently considered EXPERIMENTAL, and is subject to 140 future changes across minor/micro versions. 141 - ident: MaxPBES2Count 142 interface: GlobalOption 143 argument_type: int 144 comment: | 145 WithMaxPBES2Count specifies the maximum number of PBES2 iterations 146 to use when decrypting a message. If not specified, the default 147 value of 10,000 is used. 148 149 This option has a global effect. 150 - ident: MaxDecompressBufferSize 151 interface: GlobalDecryptOption 152 argument_type: int64 153 comment: | 154 WithMaxDecompressBufferSize specifies the maximum buffer size for used when 155 decompressing the payload of a JWE message. If a compressed JWE payload 156 exceeds this amount when decompressed, jwe.Decrypt will return an error. 157 The default value is 10MB. 158 159 This option can be used for `jwe.Settings()`, which changes the behavior 160 globally, or for `jwe.Decrypt()`, which changes the behavior for that 161 specific call. 162 - ident: MaxBufferSize 163 interface: GlobalOption 164 argument_type: int64 165 comment: | 166 WithMaxBufferSize specifies the maximum buffer size for internal 167 calculations, such as when AES-CBC is performed. The default value is 256MB. 168 If set to an invalid value, the default value is used. 169 170 This option has a global effect. 171 172 Due to historical reasons this option has a vague name, but in future versions 173 it will be appropriately renamed.