Introduction
This challenge aims to test your knowledge of base64 encoding in Golang.
This challenge aims to test your knowledge of base64 encoding in Golang.
You are required to write a Golang program that encodes and decodes a given string using both standard and URL-compatible base64 encoding.
encoding/base64
package with the b64
name instead of the default base64
.## The string encodes to slightly different values with the
## standard and URL base64 encoders (trailing `+` vs `-`)
## but they both decode to the original string as desired.
$ go run base64-encoding.go
YWJjMTIzIT8kKiYoKSctPUB+
abc123!?$*&()'-=@~
YWJjMTIzIT8kKiYoKSctPUB-
abc123!?$*&()'-=@~
In this challenge, you learned how to encode and decode a given string using both standard and URL-compatible base64 encoding in Golang.