mirror of
https://github.com/warmbly/warmbly.git
synced 2026-08-20 00:01:21 +00:00
17 lines
281 B
Go
17 lines
281 B
Go
package cdb
|
|
|
|
import "encoding/base64"
|
|
|
|
func EncodePageState(state []byte) string {
|
|
return base64.StdEncoding.EncodeToString(state)
|
|
}
|
|
|
|
func DecodePageState(state string) []byte {
|
|
resp, err := base64.StdEncoding.DecodeString(state)
|
|
if err != nil {
|
|
return nil
|
|
}
|
|
|
|
return resp
|
|
}
|