diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-03-03 18:10:32 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-03-03 18:10:32 +0400 |
commit | 6c2a2a1ed5d97d75eb3f2c1bde63c0d3dc9cacae (patch) | |
tree | e10723a82378737af80e862365f8fda4d9636592 /core/src/main/java/org/bouncycastle | |
parent | cbbc76fd0a6884eb308b66ecf41cab7b3868fc12 (diff) | |
parent | 41a9e336bcd788ca04013bf730a1627ae9c8655a (diff) |
Merge branch 'master' of git.bouncycastle.org:bc-java
Diffstat (limited to 'core/src/main/java/org/bouncycastle')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/io/CipherInputStream.java | 8 | ||||
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/io/CipherInputStream.java b/core/src/main/java/org/bouncycastle/crypto/io/CipherInputStream.java index 93b04e99..66772df5 100644 --- a/core/src/main/java/org/bouncycastle/crypto/io/CipherInputStream.java +++ b/core/src/main/java/org/bouncycastle/crypto/io/CipherInputStream.java @@ -46,7 +46,9 @@ public class CipherInputStream this.bufferedBlockCipher = cipher; - buf = new byte[cipher.getOutputSize(INPUT_BUF_SIZE)]; + int outSize = cipher.getOutputSize(INPUT_BUF_SIZE); + + buf = new byte[(outSize > INPUT_BUF_SIZE) ? outSize : INPUT_BUF_SIZE]; inBuf = new byte[INPUT_BUF_SIZE]; } @@ -71,7 +73,9 @@ public class CipherInputStream this.aeadBlockCipher = cipher; - buf = new byte[cipher.getOutputSize(INPUT_BUF_SIZE)]; + int outSize = cipher.getOutputSize(INPUT_BUF_SIZE); + + buf = new byte[(outSize > INPUT_BUF_SIZE) ? outSize : INPUT_BUF_SIZE]; inBuf = new byte[INPUT_BUF_SIZE]; } diff --git a/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java b/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java index aaae0645..f34b18c2 100644 --- a/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java +++ b/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java @@ -48,6 +48,8 @@ public class RSADigestSigner oidMap.put("SHA-256", NISTObjectIdentifiers.id_sha256); oidMap.put("SHA-384", NISTObjectIdentifiers.id_sha384); oidMap.put("SHA-512", NISTObjectIdentifiers.id_sha512); + oidMap.put("SHA-512/224", NISTObjectIdentifiers.id_sha512_224); + oidMap.put("SHA-512/256", NISTObjectIdentifiers.id_sha512_256); oidMap.put("MD2", PKCSObjectIdentifiers.md2); oidMap.put("MD4", PKCSObjectIdentifiers.md4); |