From d9da79d52f054d14698c32b457662f44bfbdaf39 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Wed, 6 Mar 2024 10:56:42 +0300 Subject: [PATCH] Use SHA384.HashDataAsync (#15461) --- .../Modules/OrchardCore.Resources/SubResourceIntegrityTests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/OrchardCore.Tests/Modules/OrchardCore.Resources/SubResourceIntegrityTests.cs b/test/OrchardCore.Tests/Modules/OrchardCore.Resources/SubResourceIntegrityTests.cs index ee3ce5b72ba..edd2b1e79e5 100644 --- a/test/OrchardCore.Tests/Modules/OrchardCore.Resources/SubResourceIntegrityTests.cs +++ b/test/OrchardCore.Tests/Modules/OrchardCore.Resources/SubResourceIntegrityTests.cs @@ -62,8 +62,7 @@ private static async Task GetSubResourceIntegrityAsync(HttpClient httpCl var data = await httpClient.GetByteArrayAsync(url); using var memoryStream = new MemoryStream(data); - using var sha384Hash = SHA384.Create(); - var hash = sha384Hash.ComputeHash(memoryStream); + var hash = await SHA384.HashDataAsync(memoryStream); return "sha384-" + Convert.ToBase64String(hash); }