parent
e95f09191a
commit
fdaf4380fa
@ -0,0 +1,12 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import "encoding/base64"
|
||||||
|
|
||||||
|
func Base64Encode(data string) string {
|
||||||
|
return base64.StdEncoding.EncodeToString([]byte(data))
|
||||||
|
}
|
||||||
|
|
||||||
|
func Base64Decode(data string) string {
|
||||||
|
decodedByte, _ := base64.StdEncoding.DecodeString(data)
|
||||||
|
return string(decodedByte)
|
||||||
|
}
|
Loading…
Reference in new issue