From 82eb62c1f7a55b88a216b33e022850ca56c8f5c0 Mon Sep 17 00:00:00 2001 From: David Hook Date: Mon, 15 Feb 2016 22:56:16 +1100 Subject: fixed zero length message bug --- crypto/src/crypto/encodings/OaepEncoding.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit 1.4.1