Skip to content

Commit 27ea5e7

Browse files
committed
Optimize SHA256CacheHash
1 parent 322225e commit 27ea5e7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ImageWizard.Core/Caches/Hash/SHA256CacheHash.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ public class SHA256CacheHash : ICacheHash
1010
{
1111
public async Task<string> CreateAsync(Stream stream)
1212
{
13-
using SHA256 sha256 = SHA256.Create();
14-
15-
byte[] hash = await sha256.ComputeHashAsync(stream);
13+
byte[] hash = await SHA256.HashDataAsync(stream);
1614

1715
return Convert.ToHexString(hash);
1816
}

0 commit comments

Comments
 (0)