diff options
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/main/java/org/apache/poi/poifs/crypt/agile/KeyData.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/agile/KeyData.java b/poi/src/main/java/org/apache/poi/poifs/crypt/agile/KeyData.java index 5ed0d14db3..42c80ecfd7 100644 --- a/poi/src/main/java/org/apache/poi/poifs/crypt/agile/KeyData.java +++ b/poi/src/main/java/org/apache/poi/poifs/crypt/agile/KeyData.java @@ -60,7 +60,7 @@ public class KeyData { blockSize = getIntAttr(keyData, "blockSize"); keyBits = getIntAttr(keyData, "keyBits"); hashSize = getIntAttr(keyData, "hashSize"); - cipherAlgorithm = CipherAlgorithm.fromXmlId(keyData.getAttribute("cipherAlgorithm"), keyBits); + cipherAlgorithm = CipherAlgorithm.fromXmlId(keyData.getAttribute("cipherAlgorithm"), keyBits == null ? -1 : keyBits); cipherChaining = ChainingMode.fromXmlId(keyData.getAttribute("cipherChaining")); hashAlgorithm = HashAlgorithm.fromEcmaId(keyData.getAttribute("hashAlgorithm")); if (cipherAlgorithm == null || cipherChaining == null || hashAlgorithm == null) { |