Skip to content

Commit 7f2e5ca

Browse files
committed
fixed unused offset and length issue
1 parent 93f7239 commit 7f2e5ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pg/src/main/java/org/bouncycastle/openpgp/operator/jcajce/JcaAEADSecretKeyEncryptorBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public byte[] encryptKeyData(byte[] key, byte[] keyData, int keyOff, int keyLen)
9999
final Cipher c = aeadUtil.createAEADCipher(encAlgorithm, aeadAlgorithm);
100100

101101
JceAEADCipherUtil.setUpAeadCipher(c, secretKey, Cipher.ENCRYPT_MODE, iv, 128, aad);
102-
byte[] data = c.doFinal(keyData);
102+
byte[] data = c.doFinal(keyData, keyOff, keyLen);
103103
return data;
104104
}
105105
catch (IOException | InvalidAlgorithmParameterException | InvalidKeyException |

0 commit comments

Comments
 (0)