Opt get change to getOrNull

This commit is contained in:
Looly
2024-08-20 18:33:07 +08:00
parent 780029c032
commit 9ee9fb8866
13 changed files with 33 additions and 33 deletions

View File

@@ -450,7 +450,7 @@ public class SymmetricCrypto implements SymmetricEncryptor, SymmetricDecryptor,
private SymmetricCrypto initParams(final String algorithm, AlgorithmParameterSpec paramsSpec) {
if (null == paramsSpec) {
byte[] iv = Opt.ofNullable(cipher)
.map(JceCipher::getRaw).map(Cipher::getIV).get();
.map(JceCipher::getRaw).map(Cipher::getIV).getOrNull();
// 随机IV
if (StrUtil.startWithIgnoreCase(algorithm, "PBE")) {