Answers for "go convert binary data into ASCII text using Base64 RFC 4648."

Go
0

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))
}
Posted by: Guest on February-24-2021

Code answers related to "go convert binary data into ASCII text using Base64 RFC 4648."

Browse Popular Code Answers by Language