diff --git a/ModernKeePassLib/Cryptography/SelfTest.cs b/ModernKeePassLib/Cryptography/SelfTest.cs index 03916da..22206d4 100644 --- a/ModernKeePassLib/Cryptography/SelfTest.cs +++ b/ModernKeePassLib/Cryptography/SelfTest.cs @@ -687,7 +687,8 @@ namespace ModernKeePassLib.Cryptography private static void HmacEval(byte[] pbKey, byte[] pbMsg, byte[] pbExpc, string strID) { -/*#if ModernKeePassLib +#if ModernKeePassLib + /* // WinRT var h = MacAlgorithmProvider.OpenAlgorithm(MacAlgorithmNames.HmacSha256).CreateHash(CryptographicBuffer.CreateFromByteArray(pbKey)); h.Append(CryptographicBuffer.CreateFromByteArray(pbMsg)); @@ -712,8 +713,8 @@ namespace ModernKeePassLib.Cryptography //h.BlockUpdate(pbMsg, 0, pbMsg.Length); //h.DoFinal(pbHash, 0); //if (!MemUtil.ArraysEqual(pbHash, pbExpc)) - // throw new SecurityException("HMAC-SHA-256-" + strID + "-R"); -#else*/ + // throw new SecurityException("HMAC-SHA-256-" + strID + "-R");*/ +#else // Original using(HMACSHA256 h = new HMACSHA256(pbKey)) { @@ -733,7 +734,7 @@ namespace ModernKeePassLib.Cryptography if(!MemUtil.ArraysEqual(pbHash, pbExpc)) throw new SecurityException("HMAC-SHA-256-" + strID + "-R"); } -//#endif +#endif } #endif