diff options
author | Kenny Root <kroot@google.com> | 2014-02-27 10:09:19 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2014-02-27 10:11:34 -0800 |
commit | 9e52a4cb3e429adf5b7a48fae96c80bc7088367e (patch) | |
tree | 41d7f30089044de3342951803e29d41f66be1b29 /bcprov | |
parent | 0620ff904e6b109c38a0032f1c1df6bd05f6662f (diff) | |
download | android_external_bouncycastle-9e52a4cb3e429adf5b7a48fae96c80bc7088367e.tar.gz android_external_bouncycastle-9e52a4cb3e429adf5b7a48fae96c80bc7088367e.tar.bz2 android_external_bouncycastle-9e52a4cb3e429adf5b7a48fae96c80bc7088367e.zip |
OpenSSLDigest: length to length-offset
doFinal(...) length was being passed in incorrectly.
Bug: 13224655
Change-Id: Ie738446910532a67940fbcd06c5cc961cf7ef9cc
Diffstat (limited to 'bcprov')
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java b/bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java index 5aa1eec..5a87f2a 100644 --- a/bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java +++ b/bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java @@ -65,7 +65,7 @@ public class OpenSSLDigest implements ExtendedDigest { public int doFinal(byte[] out, int outOff) { try { - return delegate.digest(out, outOff, out.length); + return delegate.digest(out, outOff, out.length - outOff); } catch (DigestException e) { throw new RuntimeException(e); } |