2022-07-16 23:13:57 -03:00
|
|
|
# base64
|
|
|
|
|
|
|
|
> Codifica e decodifica usando a representação Base64.
|
2025-04-30 10:16:11 -07:00
|
|
|
> Mais informações: <https://keith.github.io/xcode-man-pages/bintrans.1>.
|
2022-07-16 23:13:57 -03:00
|
|
|
|
2023-12-27 15:37:07 -03:00
|
|
|
- Codifica um arquivo:
|
2022-07-16 23:13:57 -03:00
|
|
|
|
2025-03-07 20:49:30 +02:00
|
|
|
`base64 {{[-i|--input]}} {{arquivo}}`
|
2022-07-16 23:13:57 -03:00
|
|
|
|
2023-12-27 15:37:07 -03:00
|
|
|
- Decodifica um arquivo:
|
2022-07-16 23:13:57 -03:00
|
|
|
|
2025-03-07 20:49:30 +02:00
|
|
|
`base64 {{[-d|--decode]}} {{[-i|--input]}} {{arquivo_base64}}`
|
2022-07-16 23:13:57 -03:00
|
|
|
|
2023-12-27 15:37:07 -03:00
|
|
|
- Codifica de `stdin`:
|
2022-07-16 23:13:57 -03:00
|
|
|
|
|
|
|
`echo -n "{{texto}}" | base64`
|
|
|
|
|
2023-12-27 15:37:07 -03:00
|
|
|
- Decodifica de `stdin`:
|
2022-07-16 23:13:57 -03:00
|
|
|
|
2025-03-07 20:49:30 +02:00
|
|
|
`echo -n {{texto_base64}} | base64 {{[-d|--decode]}}`
|