Skip to content

Instantly share code, notes, and snippets.

@cjemorton
Forked from iAnatoly/base64
Created December 20, 2021 17:12
Show Gist options
  • Select an option

  • Save cjemorton/4bb0b794831be1c91695d01bb0ff8ca4 to your computer and use it in GitHub Desktop.

Select an option

Save cjemorton/4bb0b794831be1c91695d01bb0ff8ca4 to your computer and use it in GitHub Desktop.
One-liners encoding and decoding Base64 in powershell
[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("SecretMessage"))
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("U2VjcmV0TWVzc2FnZQ=="))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment