im47cn opened a new pull request, #6531:
URL: https://github.com/apache/shenyu/pull/6531

   ## Motivation
   The cryptor plugin ships only RSA out of the box. Users needing symmetric 
ciphers (AES, SM4) have no built-in strategy today; SM4 is also required for 
Chinese national-standard (GM) compliance.
   
   ## Modifications
   - New `AesStrategy` and `Sm4Strategy` (`@Join`) implementing the 
`CryptorStrategy` SPI, registered as `aes` and `sm4`.
   - Shared `AbstractCbcCryptorStrategy` encapsulates CBC wiring: key parsing, 
`SecretKeySpec`/`IvParameterSpec` init and BouncyCastle provider registration; 
subclasses only declare transformation + algorithm.
   - Key convention `base64(secret):base64(iv)`, fixed 
`AES|SM4/CBC/PKCS7Padding`.
   - Added `bcprov-jdk18on` to the cryptor module.
   
   **No breaking changes**: the `CryptorStrategy` interface, 
`CryptorRuleHandler`, admin and existing RSA rules are untouched.
   
   ## Rule config example
   `strategyName=sm4`, `key=<base64-secret>:<base64-iv>`
   
   ## Tests
   - Parameterized round-trip (ASCII/CJK/JSON) and invalid-key-format cases for 
both strategies.
   - New strategy classes at 100% instruction coverage (Jacoco); existing RSA + 
plugin tests still pass (33 total).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to