mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
ModernKeePassLib implements HMAC correctly
Blake2b also implemented, but not tested ModernKeePass app better implements focus on database password box (but still not working correctly)
This commit is contained in:
15
ModernKeePassLib/Cryptography/Hash/HMACSHA1.cs
Normal file
15
ModernKeePassLib/Cryptography/Hash/HMACSHA1.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Org.BouncyCastle.Crypto.Digests;
|
||||
using Org.BouncyCastle.Crypto.Macs;
|
||||
using Org.BouncyCastle.Crypto.Parameters;
|
||||
|
||||
namespace ModernKeePassLib.Cryptography.Hash
|
||||
{
|
||||
public class HMACSHA1: HMAC
|
||||
{
|
||||
public HMACSHA1(byte[] key)
|
||||
{
|
||||
_hmac = new HMac(new Sha1Digest());
|
||||
_hmac.Init(new KeyParameter(key));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user