Skip to content

Instantly share code, notes, and snippets.

@worldofprasanna
Last active November 6, 2018 23:20
Show Gist options
  • Save worldofprasanna/d028eb22417f998c0d3e5456787f4551 to your computer and use it in GitHub Desktop.
Save worldofprasanna/d028eb22417f998c0d3e5456787f4551 to your computer and use it in GitHub Desktop.
Base64 Encoding
plainText := "Hello World"
plainTextBytes := []byte(plainText)
cipherText := base64.StdEncoding.EncodeToString(plainTextBytes)
fmt.Println(cipherText)
// Output: SGVsbG8gV29ybGQ=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment