b
✅ Sending an HTTP GET request with a JSON body and then reading it in the .NET Core Web Server
I have already tried this (these) StackOverflow solution: https://stackoverflow.com/questions/61004264/how-can-i-send-a-get-request-with-json-body
https://stackoverflow.com/questions/43421126/how-to-use-httpclient-to-send-content-in-body-of-get-request
84 replies
✅ Verify Signed Message with Server's Public Key?
Relevant Docs: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rsacryptoserviceprovider.verifydata?view=net-9.0
Code in reply.
After calling
RetrievePublicKey()
on client and then ProtectedSign("Hello")
keep getting false printed because _clientRsaProvider.VerifyData(dataToCompare, SHA1.Create(), signedBytes)
is False
.
I don't understand why this is. dataToCompare
is "Hello"
in ASCII encoded bytes, and signedBytes
is the same as signedDataBytes = _rsaProvider.SignData(originalMessageBytes, SHA1.Create())
on the server, just reverse-engineered by the client by using the hex string passed by the server.26 replies