Skip to content

Commit 96b6f56

Browse files
committed
Merge pull request #184 from RPrimrose/master
Amend FileCacheHash for FIPS compliance by using SHA1 instead of MD5
2 parents 64c36c5 + 594b386 commit 96b6f56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/React.Core/FileCacheHash.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public class FileCacheHash : IFileCacheHash
2424
private const string HASH_PREFIX = "// @hash v3-";
2525

2626
/// <summary>
27-
/// Althorithm for calculating file hashes
27+
/// Algorithm for calculating file hashes
2828
/// </summary>
29-
private readonly HashAlgorithm _hash = MD5.Create();
29+
private readonly HashAlgorithm _hash = SHA1.Create("System.Security.Cryptography.SHA1Cng");
3030

3131
/// <summary>
3232
/// Calculates a hash for the specified input

src/React.Tests/Core/FileCacheHashTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace React.Tests.Core
1414
[TestFixture]
1515
public class FileCacheHashTests
1616
{
17-
private const string SAMPLE_HASH = "B10A8DB164E0754105B7A99BE72E3FE5";
17+
private const string SAMPLE_HASH = "0A4D55A8D778E5022FAB701977C5D840BBC486D0";
1818

1919
[Test]
2020
public void TestCalculateHash()

0 commit comments

Comments
 (0)