diff options
author | David Hook <dgh@cryptoworkshop.com> | 2016-02-15 22:56:16 +1100 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2016-02-15 22:56:16 +1100 |
commit | 82eb62c1f7a55b88a216b33e022850ca56c8f5c0 (patch) | |
tree | 71e14e5d0710c2a37d6cdaf863276d6a3832fc07 | |
parent | fixed sign on BigInteger creation (diff) | |
download | BouncyCastle.NET-ed25519-82eb62c1f7a55b88a216b33e022850ca56c8f5c0.tar.xz |
fixed zero length message bug
-rw-r--r-- | crypto/src/crypto/encodings/OaepEncoding.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/crypto/encodings/OaepEncoding.cs b/crypto/src/crypto/encodings/OaepEncoding.cs index 95814ef25..cb23b1710 100644 --- a/crypto/src/crypto/encodings/OaepEncoding.cs +++ b/crypto/src/crypto/encodings/OaepEncoding.cs @@ -273,7 +273,7 @@ namespace Org.BouncyCastle.Crypto.Encodings } } - if (start >= (block.Length - 1) || block[start] != 1) + if (start > (block.Length - 1) || block[start] != 1) { throw new InvalidCipherTextException("data start wrong " + start); } |