go convert binary data into ASCII text using Base64 RFC 4648. code example
Example: go convert binary data into ASCII text using Base64 RFC 4648.
import (
"encoding/base64"
"fmt"
)
func main() {
// encode
b64txt := base64.StdEncoding.EncodeToString([]byte("The quick brown fox jumps over the lazy dog"))
//decode
data, _ := base64.StdEncoding.DecodeString(b64txt)
fmt.Printf("message = %s\n", string(data))
}