| 1 | import { createDecipheriv } from "crypto"; |
| 2 | import { env } |
| 3 | |
| 4 | export function safeDecrypt(value |
| 5 | try { |
| 6 | const key = |
| 7 | const [ivHex, |
| 8 | if (!ivHex || |
| 9 | const decipher = |
| 10 | decipher.setAuthTag(Buffer |
| 11 | return decipher.update |
| 12 | } catch { |
| 13 | return value; |
| 14 | } |
| 15 | } |