diff --git a/Src/CrispyWaffle/Cryptography/HashAlgorithmType.cs b/Src/CrispyWaffle/Cryptography/HashAlgorithmType.cs index 005066f6..229d3e5b 100644 --- a/Src/CrispyWaffle/Cryptography/HashAlgorithmType.cs +++ b/Src/CrispyWaffle/Cryptography/HashAlgorithmType.cs @@ -29,4 +29,21 @@ public enum HashAlgorithmType /// The SHA-512 algorithm. /// Sha512, + +#if NET8_0_OR_GREATER + /// + /// The SHA3-256 algorithm. Available in .NET 8.0 and later. + /// + Sha3_256, + + /// + /// The SHA3-384 algorithm. Available in .NET 8.0 and later. + /// + Sha3_384, + + /// + /// The SHA3-512 algorithm. Available in .NET 8.0 and later. + /// + Sha3_512, +#endif } diff --git a/Src/CrispyWaffle/Cryptography/Security.cs b/Src/CrispyWaffle/Cryptography/Security.cs index 095e72dd..de23a148 100644 --- a/Src/CrispyWaffle/Cryptography/Security.cs +++ b/Src/CrispyWaffle/Cryptography/Security.cs @@ -157,5 +157,10 @@ public static string Hash(string value, HashAlgorithmType type) { HashAlgorithmType.Sha256, SHA256.Create() }, { HashAlgorithmType.Sha384, SHA384.Create() }, { HashAlgorithmType.Sha512, SHA512.Create() }, +#if NET8_0_OR_GREATER + { HashAlgorithmType.Sha3_256, SHA3_256.Create() }, + { HashAlgorithmType.Sha3_384, SHA3_384.Create() }, + { HashAlgorithmType.Sha3_512, SHA3_512.Create() }, +#endif }; }