Skip to content
Permalink
Browse files

add support for PBKDF_Argon2 (2i, 2d and 2id variants).

  • Loading branch information...
Xor-el committed Mar 14, 2019
1 parent a3d5242 commit fabd0a57bf6ef3665a4e0f753fe724d393dc17a4
@@ -6,6 +6,11 @@ uses
Classes,
SysUtils,
uPerformanceBenchmark in '..\..\src\Core\uPerformanceBenchmark.pas',
HlpCRC in '..\..\..\HashLib\src\Checksum\HlpCRC.pas',
HlpICRC in '..\..\..\HashLib\src\Interfaces\HlpICRC.pas',
HlpBitConverter in '..\..\..\HashLib\src\Utils\HlpBitConverter.pas',
HlpGrindahl512 in '..\..\..\HashLib\src\Crypto\HlpGrindahl512.pas',
HlpGrindahl256 in '..\..\..\HashLib\src\Crypto\HlpGrindahl256.pas',
HlpHashFactory in '..\..\..\HashLib\src\Base\HlpHashFactory.pas',
HlpCRC32Fast in '..\..\..\HashLib\src\Checksum\HlpCRC32Fast.pas',
HlpCRC64 in '..\..\..\HashLib\src\Checksum\HlpCRC64.pas',
@@ -24,14 +29,13 @@ uses
HlpHashCryptoNotBuildIn in '..\..\..\HashLib\src\Base\HlpHashCryptoNotBuildIn.pas',
HlpHMACNotBuildInAdapter in '..\..\..\HashLib\src\Base\HlpHMACNotBuildInAdapter.pas',
HlpPBKDF2_HMACNotBuildInAdapter in '..\..\..\HashLib\src\KDF\HlpPBKDF2_HMACNotBuildInAdapter.pas',
HlpPBKDF_Argon2NotBuildInAdapter in '..\..\..\HashLib\src\KDF\HlpPBKDF_Argon2NotBuildInAdapter.pas',
HlpArgon2TypeAndVersion in '..\..\..\HashLib\src\KDF\HlpArgon2TypeAndVersion.pas',
HlpPanama in '..\..\..\HashLib\src\Crypto\HlpPanama.pas',
HlpGrindahl256 in '..\..\..\HashLib\src\Crypto\HlpGrindahl256.pas',
HlpGrindahl512 in '..\..\..\HashLib\src\Crypto\HlpGrindahl512.pas',
HlpAdler32 in '..\..\..\HashLib\src\Checksum\HlpAdler32.pas',
HlpAP in '..\..\..\HashLib\src\Hash32\HlpAP.pas',
HlpBernstein in '..\..\..\HashLib\src\Hash32\HlpBernstein.pas',
HlpBernstein1 in '..\..\..\HashLib\src\Hash32\HlpBernstein1.pas',
HlpBitConverter in '..\..\..\HashLib\src\Utils\HlpBitConverter.pas',
HlpBKDR in '..\..\..\HashLib\src\Hash32\HlpBKDR.pas',
HlpBlake2BConfig in '..\..\..\HashLib\src\Crypto\Blake2BConfigurations\HlpBlake2BConfig.pas',
HlpBlake2BIvBuilder in '..\..\..\HashLib\src\Crypto\Blake2BConfigurations\HlpBlake2BIvBuilder.pas',
@@ -40,7 +44,6 @@ uses
HlpBlake2SConfig in '..\..\..\HashLib\src\Crypto\Blake2SConfigurations\HlpBlake2SConfig.pas',
HlpBlake2SIvBuilder in '..\..\..\HashLib\src\Crypto\Blake2SConfigurations\HlpBlake2SIvBuilder.pas',
HlpBlake2STreeConfig in '..\..\..\HashLib\src\Crypto\Blake2SConfigurations\HlpBlake2STreeConfig.pas',
HlpCRC in '..\..\..\HashLib\src\Checksum\HlpCRC.pas',
HlpCRC16 in '..\..\..\HashLib\src\Checksum\HlpCRC16.pas',
HlpDEK in '..\..\..\HashLib\src\Hash32\HlpDEK.pas',
HlpDJB in '..\..\..\HashLib\src\Hash32\HlpDJB.pas',
@@ -60,7 +63,6 @@ uses
HlpIBlake2BTreeConfig in '..\..\..\HashLib\src\Interfaces\IBlake2BConfigurations\HlpIBlake2BTreeConfig.pas',
HlpIBlake2SConfig in '..\..\..\HashLib\src\Interfaces\IBlake2SConfigurations\HlpIBlake2SConfig.pas',
HlpIBlake2STreeConfig in '..\..\..\HashLib\src\Interfaces\IBlake2SConfigurations\HlpIBlake2STreeConfig.pas',
HlpICRC in '..\..\..\HashLib\src\Interfaces\HlpICRC.pas',
HlpIHash in '..\..\..\HashLib\src\Interfaces\HlpIHash.pas',
HlpIHashResult in '..\..\..\HashLib\src\Interfaces\HlpIHashResult.pas',
HlpIKDF in '..\..\..\HashLib\src\Interfaces\HlpIKDF.pas',
@@ -28,6 +28,8 @@ uses
HlpHashCryptoNotBuildIn in '..\..\..\HashLib\src\Base\HlpHashCryptoNotBuildIn.pas',
HlpHMACNotBuildInAdapter in '..\..\..\HashLib\src\Base\HlpHMACNotBuildInAdapter.pas',
HlpPBKDF2_HMACNotBuildInAdapter in '..\..\..\HashLib\src\KDF\HlpPBKDF2_HMACNotBuildInAdapter.pas',
HlpPBKDF_Argon2NotBuildInAdapter in '..\..\..\HashLib\src\KDF\HlpPBKDF_Argon2NotBuildInAdapter.pas',
HlpArgon2TypeAndVersion in '..\..\..\HashLib\src\KDF\HlpArgon2TypeAndVersion.pas',
HlpPanama in '..\..\..\HashLib\src\Crypto\HlpPanama.pas',
HlpAdler32 in '..\..\..\HashLib\src\Checksum\HlpAdler32.pas',
HlpAP in '..\..\..\HashLib\src\Hash32\HlpAP.pas',
@@ -113,6 +113,8 @@ uses
HlpIBlake2STreeConfig in '..\..\HashLib\src\Interfaces\IBlake2SConfigurations\HlpIBlake2STreeConfig.pas',
HlpIBlake2BTreeConfig in '..\..\HashLib\src\Interfaces\IBlake2BConfigurations\HlpIBlake2BTreeConfig.pas',
HlpPBKDF2_HMACNotBuildInAdapter in '..\..\HashLib\src\KDF\HlpPBKDF2_HMACNotBuildInAdapter.pas',
HlpPBKDF_Argon2NotBuildInAdapter in '..\..\HashLib\src\KDF\HlpPBKDF_Argon2NotBuildInAdapter.pas',
HlpArgon2TypeAndVersion in '..\..\HashLib\src\KDF\HlpArgon2TypeAndVersion.pas',
HlpNullable in '..\..\HashLib\src\Nullable\HlpNullable.pas',
HlpConverters in '..\..\HashLib\src\Utils\HlpConverters.pas',
HlpBitConverter in '..\..\HashLib\src\Utils\HlpBitConverter.pas',
@@ -128,7 +130,8 @@ uses
Hash128Tests in '..\src\Hash128Tests.pas',
CryptoTests in '..\src\CryptoTests.pas',
BitConverterTests in '..\src\BitConverterTests.pas',
PBKDF2_HMACTests in '..\src\PBKDF2_HMACTests.pas';
PBKDF2_HMACTests in '..\src\PBKDF2_HMACTests.pas',
PBKDF_Argon2Tests in '..\src\PBKDF_Argon2Tests.pas';

begin

@@ -116,6 +116,8 @@ uses
HlpIBlake2STreeConfig in '..\..\HashLib\src\Interfaces\IBlake2SConfigurations\HlpIBlake2STreeConfig.pas',
HlpIBlake2BTreeConfig in '..\..\HashLib\src\Interfaces\IBlake2BConfigurations\HlpIBlake2BTreeConfig.pas',
HlpPBKDF2_HMACNotBuildInAdapter in '..\..\HashLib\src\KDF\HlpPBKDF2_HMACNotBuildInAdapter.pas',
HlpPBKDF_Argon2NotBuildInAdapter in '..\..\HashLib\src\KDF\HlpPBKDF_Argon2NotBuildInAdapter.pas',
HlpArgon2TypeAndVersion in '..\..\HashLib\src\KDF\HlpArgon2TypeAndVersion.pas',
HlpNullable in '..\..\HashLib\src\Nullable\HlpNullable.pas',
HlpConverters in '..\..\HashLib\src\Utils\HlpConverters.pas',
HlpBitConverter in '..\..\HashLib\src\Utils\HlpBitConverter.pas',
@@ -131,7 +133,8 @@ uses
Hash128Tests in '..\src\Hash128Tests.pas',
CryptoTests in '..\src\CryptoTests.pas',
BitConverterTests in '..\src\BitConverterTests.pas',
PBKDF2_HMACTests in '..\src\PBKDF2_HMACTests.pas';
PBKDF2_HMACTests in '..\src\PBKDF2_HMACTests.pas',
PBKDF_Argon2Tests in '..\src\PBKDF_Argon2Tests.pas';

begin

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="10"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
@@ -20,10 +20,9 @@
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="4">
<Item1>
@@ -39,7 +38,7 @@
<PackageName Value="FCL"/>
</Item4>
</RequiredPackages>
<Units Count="12">
<Units Count="13">
<Unit0>
<Filename Value="HashLib.lpr"/>
<IsPartOfProject Value="True"/>
@@ -89,6 +88,10 @@
<Filename Value="..\src\HashLibTestBase.pas"/>
<IsPartOfProject Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\src\PBKDF_Argon2Tests.pas"/>
<IsPartOfProject Value="True"/>
</Unit12>
</Units>
</ProjectOptions>
<CompilerOptions>
@@ -16,7 +16,8 @@
Hash128Tests,
CryptoTests,
BitConverterTests,
PBKDF2_HMACTests;
PBKDF2_HMACTests,
PBKDF_Argon2Tests;

{$R *.res}

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="10"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
@@ -50,16 +50,9 @@
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<CommandLineParams Value="--format=plain --all --progress"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<CommandLineParams Value="--format=plain --all --progress"/>
</local>
</Mode0>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
@@ -69,7 +62,7 @@
<PackageName Value="FCL"/>
</Item2>
</RequiredPackages>
<Units Count="12">
<Units Count="13">
<Unit0>
<Filename Value="HashLibConsole.lpr"/>
<IsPartOfProject Value="True"/>
@@ -119,6 +112,10 @@
<Filename Value="..\src\HashLibTestBase.pas"/>
<IsPartOfProject Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\src\PBKDF_Argon2Tests.pas"/>
<IsPartOfProject Value="True"/>
</Unit12>
</Units>
</ProjectOptions>
<CompilerOptions>
@@ -14,7 +14,8 @@
Hash128Tests,
CryptoTests,
BitConverterTests,
PBKDF2_HMACTests;
PBKDF2_HMACTests,
PBKDF_Argon2Tests;

type

@@ -76,6 +76,8 @@ procedure TTestPBKDF2_HMACSHA1.TestOne;

end;

{ TTestPBKDF2_HMACSHA2_256 }

procedure TTestPBKDF2_HMACSHA2_256.TestOne;
var
Password, Salt, Key: TBytes;
Oops, something went wrong.

0 comments on commit fabd0a5

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.