This guide is a short tutorial on how to verify a with Virgil Security.
For original information about the Digital Signature follow the link here.
Set up your project environment before starting to verify a Digital Signature, with the getting started guide.
The Signature Verification procedure is shown in the figure below.
In order to verify the Digital Signature, Bob has to have Alice's .
Let's review the Digital Signature verification process:
- Developers need to initialize the
var virgil = new VirgilApi("[YOUR_ACCESS_TOKEN_HERE]");
- Then Bob has to take Alice's and search for Alice's Virgil Card on
- Bob then verifies the signature. If the signature is invalid, Bob will receive an error message.
// search for Virgil Card
var aliceCard = await virgil.Cards.Get("[ALICE_CARD_ID_HERE]");
// verify signature using Alice's Virgil Card
if (!aliceCard.Verify(message, signature))
throw new Exception("Aha... Alice it's not you.");