summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crypto/src/crypto/engines/RFC3394WrapEngine.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/crypto/engines/RFC3394WrapEngine.cs b/crypto/src/crypto/engines/RFC3394WrapEngine.cs
index 7596e7218..5615a63e5 100644
--- a/crypto/src/crypto/engines/RFC3394WrapEngine.cs
+++ b/crypto/src/crypto/engines/RFC3394WrapEngine.cs
@@ -90,7 +90,7 @@ namespace Org.BouncyCastle.Crypto.Engines
 			byte[] buf = new byte[8 + iv.Length];
 
 			Array.Copy(iv, 0, block, 0, iv.Length);
-			Array.Copy(input, 0, block, iv.Length, inLen);
+			Array.Copy(input, inOff, block, iv.Length, inLen);
 
 			engine.Init(true, param);
 
@@ -140,8 +140,8 @@ namespace Org.BouncyCastle.Crypto.Engines
 			byte[]  a = new byte[iv.Length];
 			byte[]  buf = new byte[8 + iv.Length];
 
-			Array.Copy(input, 0, a, 0, iv.Length);
-			Array.Copy(input, iv.Length, block, 0, inLen - iv.Length);
+			Array.Copy(input, inOff, a, 0, iv.Length);
+            Array.Copy(input, inOff + iv.Length, block, 0, inLen - iv.Length);
 
 			engine.Init(false, param);