mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-04-28 19:35:03 +00:00
14 lines
249 B
Go
14 lines
249 B
Go
|
package utils
|
||
|
|
||
|
import "strings"
|
||
|
|
||
|
const sep = "_CREDENTIALS_"
|
||
|
|
||
|
func EncodeRecoveryToken(data ...string) string {
|
||
|
return strings.Join(data, sep)
|
||
|
}
|
||
|
|
||
|
func DecodeRecoveryToken(recoverytoken string) []string {
|
||
|
return strings.Split(recoverytoken, sep)
|
||
|
}
|