Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2c8a76a
Update ReflectionHelper.cs with refurbished instance creaters
LordOfXen Sep 10, 2025
9344509
Add config profile attributes
LordOfXen Sep 10, 2025
dc936d9
Add config profile class and interface
LordOfXen Sep 10, 2025
b6f7e85
Refactor HashFactory to include config profiles and way better lambdas
LordOfXen Sep 10, 2025
58265dc
Update _implementations access in Hash Factory Extensions
LordOfXen Sep 10, 2025
92d3ba1
Rename ConfigProfilesAttribute to HashConfigProfilesAttribute
LordOfXen Sep 10, 2025
75140d1
Rename ConfigProfilesAttribute to HashConfigProfilesAttribute
LordOfXen Sep 10, 2025
043e3f3
Delete HashifyNet/Core/Attributes/HashConfigProfilesAttribute.cs
LordOfXen Sep 10, 2025
4175b93
Add files via upload
LordOfXen Sep 10, 2025
79ec1cc
Switch config profile attribute implementation to a CLS-Compliant code
LordOfXen Sep 10, 2025
92f052b
Update attribute references
LordOfXen Sep 10, 2025
ad56a5e
Delete HashifyNet/Core/Attributes/HashConfigProfileAttribute.cs
LordOfXen Sep 10, 2025
ad92b7a
Rename HashConfigProfileAttribute to DefineHashConfigProfile
LordOfXen Sep 10, 2025
9f16947
Rename HashConfigProfile to DefineHashConfigProfile
LordOfXen Sep 10, 2025
59914f8
Remove redundant usings
LordOfXen Sep 10, 2025
0f6a7c2
Add config profile definition attribute
LordOfXen Sep 10, 2025
0a27ebf
Add config declaration attribute
LordOfXen Sep 10, 2025
69b039f
Update BuzHashConfig with correct usings and comments
LordOfXen Sep 10, 2025
947119e
Update using directives
LordOfXen Sep 10, 2025
fda335d
Add config profile definition attribute
LordOfXen Sep 10, 2025
f4657c9
Add config profile declaration attribute
LordOfXen Sep 10, 2025
a70d9dc
Enhance DefineHashConfigProfileAttribute with length checks
LordOfXen Sep 10, 2025
026e1f5
Reduce max name length in DefineHashConfigProfileAttribute
LordOfXen Sep 10, 2025
54c1582
Enhance validation for DefineHashConfigProfileAttribute
LordOfXen Sep 10, 2025
7ffc838
Refactor Argon2idConfig with new attributes
LordOfXen Sep 10, 2025
4293375
Add Argon2id Config Profiles
LordOfXen Sep 10, 2025
ea6db14
Delete HashifyNet/Algorithms/Argon2id/ConfigProfiles directory
LordOfXen Sep 10, 2025
de18278
Rename Argon2idConfig defaults to include "Profile" in name
LordOfXen Sep 10, 2025
1a354f7
Repush previous commit
LordOfXen Sep 10, 2025
a9cd38f
Update Argon2id default configs to include Profile in their names
LordOfXen Sep 10, 2025
8b4a0e8
Delete HashifyNet/Algorithms/BuzHash/DefaultBuzHashConfig.cs
LordOfXen Sep 10, 2025
b8c3739
Rename DefaultBuzHashConfig
LordOfXen Sep 10, 2025
67b00af
Rename DefaultBuzHashConfig
LordOfXen Sep 10, 2025
32a4a96
Delete HashifyNet/Algorithms/Pearson/WikipediaPearsonConfig.cs
LordOfXen Sep 10, 2025
506d8a1
Rename WikipediaPearsonConfig
LordOfXen Sep 10, 2025
deaf215
Rename WikipediaPearsonConfig
LordOfXen Sep 10, 2025
a14c70e
Seal the wikipedia profile of pearson config
LordOfXen Sep 10, 2025
90876e8
Refactor BuzHashConfigProfileDefault class
LordOfXen Sep 10, 2025
ce871d4
Refactor FNVConfig by adding hash profiles
LordOfXen Sep 10, 2025
1be06d6
Add FNV Config Profiles
LordOfXen Sep 10, 2025
18a9305
Cover implementation in scopes for clarity
LordOfXen Sep 10, 2025
1e36f1b
Pad fields
LordOfXen Sep 10, 2025
529c661
Move out CRC standards and use profiles
LordOfXen Sep 10, 2025
d5dd768
Add CRC Config Profiles
LordOfXen Sep 10, 2025
31986ee
Update Pearson Tests to switch to Config Profiles
LordOfXen Sep 10, 2025
ee3e2bb
Refactor WikipediaPearsonConfig_Tests for new class
LordOfXen Sep 10, 2025
af42634
Update FactoryTests to use new config profiles
LordOfXen Sep 10, 2025
dba09bb
Update universal tests to use config profiles
LordOfXen Sep 10, 2025
41d0861
Update BuzHash tests to use config profiles
LordOfXen Sep 10, 2025
5a8ea12
Update DefaultBuzHashConfig tests to use config profiles
LordOfXen Sep 10, 2025
7173a85
Refactor FNV1Base_Tests
LordOfXen Sep 10, 2025
a3bb4d5
Add Config Profile Helper for FNV Tests
LordOfXen Sep 10, 2025
f6e539c
Use ConfigProfileHelper for FNV tests
LordOfXen Sep 10, 2025
3d0a2d4
Use ConfigProfileHelper for FNV Tests
LordOfXen Sep 10, 2025
8c91b79
Use ConfigProfileHelper for FNV Tests
LordOfXen Sep 10, 2025
489b818
Update CRC tests to use config profiles
LordOfXen Sep 10, 2025
19f16de
Update CRC tests to use config profiles
LordOfXen Sep 10, 2025
acf1cd8
Update Argon2id tests to use config profiles
LordOfXen Sep 10, 2025
53aedce
Enhance error messages in DefineHashConfigProfileAttribute
LordOfXen Sep 10, 2025
8e19c0b
Modify minimum name length in DefineHashConfigProfileAttribute
LordOfXen Sep 10, 2025
5250d5a
Add GetConfigProfiles extension
LordOfXen Sep 10, 2025
762fd2e
Enhance FactoryTests with config profile validations
LordOfXen Sep 10, 2025
238da34
Update HashifyNet/Algorithms/FNV/ConfigProfiles/FNVConfigProfile64Bit…
LordOfXen Sep 11, 2025
054d801
Change configType to configProfileType
LordOfXen Sep 11, 2025
7849bce
Remove trailing whitespace
LordOfXen Sep 11, 2025
88e729d
Remove extra space
LordOfXen Sep 11, 2025
69a04cc
Reorder fields
LordOfXen Sep 11, 2025
d85ee43
Add ProfileType property to IHashConfigProfile
LordOfXen Sep 11, 2025
5675311
Add ProfileType to HashConfigProfile class
LordOfXen Sep 11, 2025
7135b9a
Pass configProfileType to HashConfigProfile class
LordOfXen Sep 11, 2025
6ecbcb1
Add Factory_GetConfigProfiles_Create_Works test
LordOfXen Sep 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void Argon2id_Implementation_HashSizeInBits_IsFromConfig()
[Fact]
public void Argon2id_Implementation_Verify_Works()
{
Argon2id_Implementation impl = new Argon2id_Implementation(Argon2idConfig.OWASP_Standard);
Argon2id_Implementation impl = new Argon2id_Implementation(new Argon2idConfigProfileOWASP());
IHashValue hash1 = impl.ComputeHash(TestConstants.FooBar);

Assert.NotNull(hash1);
Expand All @@ -153,7 +153,7 @@ public void Argon2id_Implementation_Verify_Works()
[Fact]
public void Argon2id_Implementation_Verify_Irrelevant_Fails()
{
Argon2id_Implementation impl = new Argon2id_Implementation(Argon2idConfig.OWASP_Standard);
Argon2id_Implementation impl = new Argon2id_Implementation(new Argon2idConfigProfileOWASP());
IHashValue hash1 = impl.ComputeHash(TestConstants.FooBar);

Assert.NotNull(hash1);
Expand Down Expand Up @@ -185,7 +185,7 @@ protected override IHashValue ComputeHash(IArgon2id hf, byte[] data)

protected override IArgon2id CreateHashFunction(int hashSize) =>
new Argon2id_Implementation(
Argon2idConfig.OWASP_Standard);
new Argon2idConfigProfileOWASP());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void BuzHash_Implementation_Constructor_Config_IsCloned()
var buzHashConfigMock = new Mock<IBuzHashConfig>();
{
buzHashConfigMock.Setup(bhc => bhc.Clone())
.Returns(new DefaultBuzHashConfig());
.Returns(new BuzHashConfigProfileDefault());
}

GC.KeepAlive(
Expand Down Expand Up @@ -402,7 +402,7 @@ public class IStreamableHashFunction_Tests

protected override IBuzHash CreateHashFunction(int hashSize) =>
new BuzHash_Implementation(
new DefaultBuzHashConfig()
new BuzHashConfigProfileDefault()
{
HashSizeInBits = hashSize
});
Expand All @@ -420,7 +420,7 @@ public class IStreamableHashFunction_Tests_DefaultConstructor

protected override IBuzHash CreateHashFunction(int hashSize) =>
new BuzHash_Implementation(
new DefaultBuzHashConfig());
new BuzHashConfigProfileDefault());
}

public class IStreamableHashFunction_Tests_RightShift
Expand All @@ -444,7 +444,7 @@ public class IStreamableHashFunction_Tests_RightShift

protected override IBuzHash CreateHashFunction(int hashSize) =>
new BuzHash_Implementation(
new DefaultBuzHashConfig()
new BuzHashConfigProfileDefault()
{
HashSizeInBits = hashSize,
ShiftDirection = CircularShiftDirection.Right
Expand All @@ -463,7 +463,7 @@ public class IStreamableHashFunction_Tests_RightShift_DefaultConstructor

protected override IBuzHash CreateHashFunction(int hashSize) =>
new BuzHash_Implementation(
new DefaultBuzHashConfig()
new BuzHashConfigProfileDefault()
{
ShiftDirection = CircularShiftDirection.Right
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class DefaultBuzHashConfig_Tests
[Fact]
public void DefaultBuzHashConfig_Defaults_HaventChanged()
{
var defaultBuzHashConfig = new DefaultBuzHashConfig();
var defaultBuzHashConfig = new BuzHashConfigProfileDefault();

Assert.Equal(_expectedRtab.Select(u => unchecked((long)u)).ToArray(), defaultBuzHashConfig.Rtab);
Assert.Equal(64, defaultBuzHashConfig.HashSizeInBits);
Expand All @@ -47,7 +47,7 @@ public void DefaultBuzHashConfig_Defaults_HaventChanged()
[Fact]
public void DefaultBuzHashConfig_Clone_Works()
{
var defaultBuzHashConfig = new DefaultBuzHashConfig()
var defaultBuzHashConfig = new BuzHashConfigProfileDefault()
{
HashSizeInBits = 32,
Seed = 1337L,
Expand All @@ -56,7 +56,7 @@ public void DefaultBuzHashConfig_Clone_Works()

var defaultBuzHashConfigClone = defaultBuzHashConfig.Clone();

Assert.IsType<DefaultBuzHashConfig>(defaultBuzHashConfig);
Assert.IsType<BuzHashConfigProfileDefault>(defaultBuzHashConfig);

Assert.Equal(defaultBuzHashConfig.Rtab, defaultBuzHashConfigClone.Rtab);
Assert.Equal(defaultBuzHashConfig.HashSizeInBits, defaultBuzHashConfigClone.HashSizeInBits);
Expand Down
Loading
Loading