You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
248 B

2 years ago
package xbase64
import (
2 years ago
"encoding/base64"
2 years ago
)
func Encode(s string) string {
2 years ago
return base64.StdEncoding.EncodeToString([]byte(s))
2 years ago
}
func Decode(s string) (string, error) {
2 years ago
ds, err := base64.StdEncoding.DecodeString(s)
2 years ago
return string(ds), err
}