summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2013-07-31 11:26:07 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-07-31 11:26:07 +0700
commit8fbf91dd8620ee0f0e9421b41ab241eb67139fdc (patch)
tree0b7ef64e96158b1390b9c5886600da083123e980
parentAttempt to perform doubling operation in constant time (diff)
downloadBouncyCastle.NET-ed25519-8fbf91dd8620ee0f0e9421b41ab241eb67139fdc.tar.xz
Don't ignore the input offset argument
-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);