fix: Optimize decryption implementation (#10130)

This commit is contained in:
ssongliu 2025-08-25 16:13:56 +08:00 committed by GitHub
parent 0a5b13a418
commit 780b6cdec9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -69,6 +69,11 @@ func StringDecryptWithBase64(text string) (string, error) {
}
func StringDecryptWithKey(text, key string) (string, error) {
defer func() {
if r := recover(); r != nil {
global.LOG.Errorf("A panic occurred during string decrypt with key, error message: %v", r)
}
}()
if len(text) == 0 {
return "", nil
}

View file

@ -70,6 +70,11 @@ func StringDecrypt(text string) (string, error) {
}
func StringDecryptWithKey(text, key string) (string, error) {
defer func() {
if r := recover(); r != nil {
global.LOG.Errorf("A panic occurred during string decrypt with key, error message: %v", r)
}
}()
if len(text) == 0 {
return "", nil
}