Skip to content

Commit 881965e

Browse files
Sergio Martín Fernándezmsallin
authored andcommitted
Make SQLLiteCodeFirst FIPS compliant
This PR makes SQLiteCodeFirst FIPS compliant, needed to operate on US federal or many state government systems as it is a requirement for software vendors, replacing the SHA512Managed class with the SHA512CryptoServiceProvider. What is FIPS compliance? FIPS stands for Federal Information Processing Standards and are US Government standards that provide a benchmark for implementing cryptographic software SHA512CryptoServiceProvider uses the FIPS 140-2 validated (FIPS = Federal Information Processing Standards) Crypto Service Provider (CSP) while SHA256Managed does not.
1 parent 14d91e7 commit 881965e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SQLite.CodeFirst/Internal/Utility/HashCreator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal static class HashCreator
99
public static string CreateHash(string data)
1010
{
1111
byte[] dataBytes = Encoding.ASCII.GetBytes(data);
12-
using (SHA512 sha512 = new SHA512Managed())
12+
using (SHA512 sha512 = new SHA512CryptoServiceProvider())
1313
{
1414
byte[] hashBytes = sha512.ComputeHash(dataBytes);
1515
string hash = Convert.ToBase64String(hashBytes);

0 commit comments

Comments
 (0)