Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

HMACSHA256 not hasing the same in Core and in standard library

$
0
0

Hi,

I have a library made with Standard 2.0 framework which create a http request with an API key authaurization header using HMACSHA256.

I have the same decoding code in a ASP.NET Core application and the hashing is not the same, so I can't use it.

Both use system.security.cryptography namespace.

If I check the definition, the application use this dll:

C:\Program Files\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.1\build\netstandard2.0\ref\netstandard.dll

The library use this dll:

C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Security.Cryptography.Algorithms.dll

How come the same function doesn't hash the same way??

I've check the data I hash in both place and it's the same, so it's really the hashing that's not the same.

Is it possible to use the same dll?

Thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles