2
I have a. pem file converted from a A3(.pfx) digital certificate I need to sign 2 Cnpjs concatenated using this file. pem, which contains 2 Keys 1 Public and another Private, I need to use the private key to make the signature of Cnpjs, in which case it will generate a signature in Base64. There is a way to do this using Openssl, follow the link:https://www.madboa.com/geek/openssl/#Digest-Sign. But in case I wanted to know if it would be possible to do this in the language of VB.net or in C#, In VB I imported (Imports System.Security.Cryptography), but I could not give continuity. Someone would have a hint?
See if this one of these links helps you: "Cryptographic Signatures" (lower level) or "How to: Sign XML Documents with Digital Signatures" (higher level, for signing XML documents). Both have examples in C# and VB.
– mgibsonbr
<https://msdn.microsoft.com/pt-br/library/ms229745(v=vs.110). aspx? Cs-save-lang=1&Cs-lang=Vb#code-snippet-1> Check there as there is an example on the Microsoft website
– Elias Sant'Anna