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
246 B

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