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.
|
package utils
|
|
|
|
import "encoding/base64"
|
|
|
|
func Base64Encode(str string) string {
|
|
data := base64.StdEncoding.EncodeToString([]byte(str))
|
|
return data
|
|
}
|
|
|
|
func Base64Decode(str string) []byte {
|
|
data, _ := base64.StdEncoding.DecodeString(str)
|
|
return data
|
|
}
|
|
|