WIP - Implementing HMAC with BouncyCastle

This commit is contained in:
bg45
2017-10-22 06:18:57 -04:00
committed by BONNEVILLE Geoffroy
parent c82d6d001d
commit 84e7afc819
9 changed files with 56 additions and 37 deletions

View File

@@ -687,8 +687,8 @@ namespace ModernKeePassLib.Cryptography
private static void HmacEval(byte[] pbKey, byte[] pbMsg,
byte[] pbExpc, string strID)
{
// WinRT
#if ModernKeePassLib
// WinRT
var h = MacAlgorithmProvider.OpenAlgorithm(MacAlgorithmNames.HmacSha256).CreateHash(CryptographicBuffer.CreateFromByteArray(pbKey));
h.Append(CryptographicBuffer.CreateFromByteArray(pbMsg));
var pbHash = h.GetValueAndReset().ToArray();