aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-02-04 17:59:41 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-02-04 17:59:41 -0600
commitec9a2d9b8556be8f5f88b44e18a9fc03b4cefbd6 (patch)
treeb1423d2c798f95d62048498d5b31123ce434cb5c
parente59d78b700150c838209c4fac8a42945dc7dd49a (diff)
downloadslskd-ec9a2d9b8556be8f5f88b44e18a9fc03b4cefbd6.tar.gz
move PBKDF2
-rw-r--r--src/slskd/Common/Cryptography/PBKDF2.cs (renamed from src/slskd/Security/PBKDF2.cs)8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/slskd/Security/PBKDF2.cs b/src/slskd/Common/Cryptography/PBKDF2.cs
index 4a857135..4b8b83e4 100644
--- a/src/slskd/Security/PBKDF2.cs
+++ b/src/slskd/Common/Cryptography/PBKDF2.cs
@@ -18,11 +18,9 @@
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);
- }
+ using var rng = RandomNumberGenerator.Create();
+ rng.GetBytes(salt);
+ return KeyDerivation.Pbkdf2(password, salt, KeyDerivationPrf.HMACSHA256, iterations, 32);
}
}
}