public final class SecretCipherUtils
extends java.lang.Object
Decrypts appSecret when received from ShenYu admin (sync data center). AppSecret is stored encrypted in database but must be decrypted before use in signature verification.
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
decrypt(java.lang.String key,
java.lang.String iv,
java.lang.String ciphertext)
Decrypt ciphertext appSecret using AES/CBC/PKCS5Padding.
|
static boolean |
isEncrypted(java.lang.String value)
Check whether the given value is already encrypted (has the ENC: prefix).
|
public static java.lang.String decrypt(java.lang.String key,
java.lang.String iv,
java.lang.String ciphertext)
If the value does not start with CIPHER_PREFIX, it is treated
as legacy plaintext and returned as-is (backward compatibility).
key - AES key (must be 16 bytes for AES-128)iv - initialization vector (must be 16 bytes)ciphertext - the ciphertext from database (with ENC: prefix)public static boolean isEncrypted(java.lang.String value)
value - the value to checkCopyright © 2026 The Apache Software Foundation. All rights reserved.