From 1f3e7359ad8231c555589f787fa2455f26a90f95 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 10 Feb 2021 08:26:28 -0600 Subject: rename pbkdf2 --- src/slskd/Common/Cryptography/PBKDF2.cs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/slskd/Common/Cryptography/PBKDF2.cs (limited to 'src/slskd/Common/Cryptography/PBKDF2.cs') diff --git a/src/slskd/Common/Cryptography/PBKDF2.cs b/src/slskd/Common/Cryptography/PBKDF2.cs deleted file mode 100644 index 4b8b83e4..00000000 --- a/src/slskd/Common/Cryptography/PBKDF2.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace slskd.Security -{ - using Microsoft.AspNetCore.Cryptography.KeyDerivation; - using System.Security.Cryptography; - - /// - /// PBKDF2/RFC 2898 implementation - /// - public static class PBKDF2 - { - /// - /// Gets a 256 bit (32 byte) key derived from the specified using PBKDF2/RFC 2898 - /// - /// - /// - public static byte[] GetKey(string password) - { - byte[] salt = new byte[16]; - int iterations = 1000; - - using var rng = RandomNumberGenerator.Create(); - rng.GetBytes(salt); - return KeyDerivation.Pbkdf2(password, salt, KeyDerivationPrf.HMACSHA256, iterations, 32); - } - } -} -- cgit v1.2.3