blob: b1cbc190c6a1481549baff7f2959ff69aca102cf [file] [log] [blame]
package cipherutil
import (
"github.com/go-chassis/go-chassis/v2/security/cipher"
"github.com/go-chassis/openlog"
)
// TryDecrypt return the src when decrypt failed
func TryDecrypt(src string) string {
res, err := cipher.Decrypt(src)
if err != nil {
openlog.Info("cipher fallback: " + err.Error())
res = src
}
return res
}