0

The way to sign XML documents with digital signatures is explained in this link: https://learn.microsoft.com/en-us/dotnet/standard/security/how-to-sign-xml-documents-with-digital-signatures

Is there a similar way to sign JSON files, (or any other text files)? I am looking for C# implementation

Sergioet
  • 1,108
  • 13
  • 27
  • Look into [JwtSecurityToken Class](https://msdn.microsoft.com/en-us/library/system.identitymodel.tokens.jwtsecuritytoken(v=vs.114).aspx). Also, see [this](https://stackoverflow.com/questions/18677837/decoding-and-verifying-jwt-token-using-system-identitymodel-tokens-jwt) and [this](https://stackoverflow.com/questions/40447670/signing-a-json-document-or-string-with-x509-certificate/40481635#40481635) SO article. – RamblinRose Sep 09 '17 at 19:05
  • [RFC7515 Json Web Signature (JWS)](https://tools.ietf.org/html/rfc7515). CMS for text ( or binary files). JWT uses JWS – pedrofb Sep 09 '17 at 19:36

0 Answers0