public class DefaultWecomCipher extends Object implements WecomCipher
| Constructor and Description |
|---|
DefaultWecomCipher(CipherAlg cipherAlg)
Instantiates a new Abstract wecom cipher.
|
private final CipherAlg cipherAlg
DefaultWecomCipher(CipherAlg cipherAlg)
cipherAlg - the cipher algpublic String encrypt(String key, String associatedData, String iv, String plainText) throws IllegalArgumentException
WecomCipherencrypt in interface WecomCipherkey - 密钥associatedData - 额外的认证加密数据iv - 初始化向量随机串plainText - 明文IllegalArgumentException - the illegal argument exceptionpublic String decrypt(String key, String associatedData, String iv, String cipherText) throws IllegalArgumentException
WecomCipherdecrypt in interface WecomCipherkey - 密钥associatedData - 额外的认证加密数据iv - 初始化向量随机串cipherText - 密文IllegalArgumentException - the illegal argument exceptionCopyright © 2023. All rights reserved.