public class AesEncryptAlgorithmApiImpl extends Object implements EncryptAlgorithmApi
| 限定符和类型 | 字段和说明 |
|---|---|
cn.hutool.crypto.symmetric.SymmetricCrypto |
symmetricCrypto
AES加密实体类
|
| 构造器和说明 |
|---|
AesEncryptAlgorithmApiImpl(byte[] key) |
public void setInstance(cn.hutool.crypto.symmetric.SymmetricCrypto instance)
EncryptAlgorithmApi只有在项目首次初始化配置时调用,随意调用会导致之前加密数据无法解密
setInstance 在接口中 EncryptAlgorithmApipublic String encrypt(String encryptedData)
EncryptAlgorithmApiencrypt 在接口中 EncryptAlgorithmApiencryptedData - 加密数据Stringpublic String decrypt(String cipher)
EncryptAlgorithmApidecrypt 在接口中 EncryptAlgorithmApicipher - 待解密密文StringCopyright © 2021. All rights reserved.