mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
13 lines
267 B
Go
13 lines
267 B
Go
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)
|
|
}
|