summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crypto/src/crypto/engines/SEEDEngine.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/src/crypto/engines/SEEDEngine.cs b/crypto/src/crypto/engines/SEEDEngine.cs
index f615b8476..d4142c867 100644
--- a/crypto/src/crypto/engines/SEEDEngine.cs
+++ b/crypto/src/crypto/engines/SEEDEngine.cs
@@ -240,6 +240,9 @@ namespace Org.BouncyCastle.Crypto.Engines
 		private int[] createWorkingKey(
 			byte[] inKey)
 		{
+			if (inKey.Length != 16)
+				throw new ArgumentException("key size must be 128 bits");
+
 			int[] key = new int[32];
 			long lower = bytesToLong(inKey, 0);
 			long upper = bytesToLong(inKey, 8);