@@ -213,64 +213,10 @@ defmodule Mix.Tasks.Docs do
213
213
## Encrypted debug info
214
214
215
215
If a module is compiled with [encrypted debug info](`:compile.file/2`), ExDoc will not be able to
216
- extract its documentation without first setting a decryption function or utilizing
217
- `.erlang.crypt` as prescribed by `m::beam_lib#module-encrypted-debug-information`. Two
218
- convenience options (see below) are provided to avoid having to call `:beam_lib.crypto_key_fun/1`
219
- out-of-band and/or to avoid using `.erlang.crypt`.
220
-
221
- If you prefer to set the key out-of-band, follow the instructions provided in the
222
- `m::beam_lib#module-encrypted-debug-information` module documentation.
223
-
224
- > ### Key exposure {: .warning}
225
- >
226
- > Avoid adding keys directly to your `mix.exs` file. Instead, use an environment variable, an
227
- > external documentation config file, or a
228
- > [closure](https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/sensitive_data#wrapping).
229
-
230
- ### `:debug_info_key`
231
-
232
- This option can be provided if you only have one key for all encrypted modules. A `t:charlist/0`,
233
- `t:String.t/0`, or tuple of `{:des3_cbc, charlist() | String.t()}` can be used.
234
-
235
- ### `:debug_info_fn` / `:debug_info_fun`
236
-
237
- This option can be provided if you have multiple keys, want more control over key retrieval, or
238
- would like to wrap your key(s) in a closure. `:debug_info_key` will be ignored if this option is
239
- also present. `:debug_info_fun` will be ignored if `:debug_info_fn` is already present.
240
-
241
- While a module can be encrypted using a tuple key such as `{:des3_cbc, ~c"secret"}`, the function
242
- that provides the key must return a regular charlist. In other words, the function should return
243
- `~c"secret"`, not `{:des3_cbc, ~c"secret"}`.
244
-
245
- A basic function that provides the decryption key `SECRET`:
246
-
247
- <!-- tabs-open -->
248
-
249
- ### Elixir
250
-
251
- ⚠️ The key returned must be a `t:charlist/0`!
252
-
253
- ```elixir
254
- fn
255
- :init -> :ok,
256
- {:debug_info, _mode, _module, _filename} -> ~c"SECRET"
257
- :clear -> :ok
258
- end
259
- ```
260
-
261
- ### Erlang
262
-
263
- ```erlang
264
- fun
265
- (init) -> ok;
266
- ({debug_info, _Mode, _Module, _Filename}) -> "SECRET";
267
- (clear) -> ok
268
- end.
269
- ```
270
-
271
- <!-- tabs-close -->
272
-
273
- See `:beam_lib.crypto_key_fun/1` for more information.
216
+ extract its documentation without preparation. ExDoc supports using `.erlang.crypt` to decrypt
217
+ debug information. Consult the
218
+ [`.erlang.crypt` section in the `:beam_lib` documentation](`m::beam_lib#module-erlang-crypt`)
219
+ for more information.
274
220
275
221
## Groups
276
222
0 commit comments