2 files changed, 5 insertions, 1 deletions
diff --git a/crypto/src/crypto/modes/GcmSivBlockCipher.cs b/crypto/src/crypto/modes/GcmSivBlockCipher.cs
index 10e7e774b..9b9512af0 100644
--- a/crypto/src/crypto/modes/GcmSivBlockCipher.cs
+++ b/crypto/src/crypto/modes/GcmSivBlockCipher.cs
@@ -724,7 +724,7 @@ namespace Org.BouncyCastle.Crypto.Modes
{
byte myValue = pValue[i];
pValue[i] = (byte)(((myValue >> 1) & ~MASK) | myMask);
- myMask = (byte)((myValue & 1) == 0 ? 0 : MASK);
+ myMask = (byte)((myValue & 1) == 0 ? (byte)0 : MASK);
}
/* Xor in addition if last bit was set */
diff --git a/crypto/test/src/crypto/test/SP80038GTest.cs b/crypto/test/src/crypto/test/SP80038GTest.cs
index 2c8d5615f..676a564bf 100644
--- a/crypto/test/src/crypto/test/SP80038GTest.cs
+++ b/crypto/test/src/crypto/test/SP80038GTest.cs
@@ -274,6 +274,9 @@ namespace Org.BouncyCastle.Crypto.Tests
private void testDisable()
{
+#if NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || (PORTABLE && !DOTNET) || NET_1_1
+ // Can't SetEnvironmentVariable !
+#else
Environment.SetEnvironmentVariable("org.bouncycastle.fpe.disable", "true");
try
{
@@ -309,6 +312,7 @@ namespace Org.BouncyCastle.Crypto.Tests
testFF3_1();
Environment.SetEnvironmentVariable("org.bouncycastle.fpe.disable_ff1", "false");
+#endif
}
private void testFF3_1_255()
|