accept all paramters as base64url
This commit is contained in:
parent
12bb1179b2
commit
ce95a8b193
4
utils.go
4
utils.go
@ -59,10 +59,10 @@ func FsEntry2Name(entry os.DirEntry) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DecodeBase64String(str string) (string, error) {
|
func DecodeBase64String(str string) (string, error) {
|
||||||
data, err := base64.StdEncoding.DecodeString(str)
|
data, err := base64.URLEncoding.DecodeString(str)
|
||||||
return string(data), err
|
return string(data), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func EncodeBase64String(str string) string {
|
func EncodeBase64String(str string) string {
|
||||||
return base64.StdEncoding.EncodeToString([]byte(str))
|
return base64.URLEncoding.EncodeToString([]byte(str))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user