修复 jwt payload解析的错误

This commit is contained in:
eson
2023-08-25 15:37:35 +08:00
parent ede181d6dd
commit f91f9d3230
21 changed files with 263 additions and 109 deletions

View File

@@ -27,7 +27,7 @@ func NewSecretCRT[T any](key string, iv string) *SecretCRT[T] {
s := &SecretCRT[T]{
derivationKey: DerivationKeyV1,
iv: []byte(iv),
EncDec: base64.URLEncoding,
EncDec: base64.RawURLEncoding,
}
s.secretKey = s.derivationKey(key)
return s

View File

@@ -49,7 +49,7 @@ func NewSecretGCM[T any](key string) *SecretGCM[T] {
s := &SecretGCM[T]{
srcKey: key,
derivationKey: DerivationKeyV1,
EncDec: base64.URLEncoding,
EncDec: base64.RawURLEncoding,
}
s.secretKey = s.derivationKey(s.srcKey)
return s