Use A User's Card for crypto operationsWith a user's Card published on Virgil Cards Service, we can encrypt data and verify a signature using Virgil SDK and Crypto Library.Prerequisites for workInstall SDK & Set up Virgil Crypto This language is only suitable for Client side. // this language is not supported yet.Set up authentication on a client side and send a JWT requestIn order to make call to Virgil Services (to publish a user's Card on Virgil Cards Service, for example), you need to have a JSON Web Token ("JWT"). Virgil SDKs let you use the Virgil token-generation functionality without having to know how they're constructed.After a user installs Virgil SDK you'll need to set up jwtProvider for providing a user with a JWT. You'll need to give your users a JWT that tells Virgil who they are and what they can do.Requests to your app server must be authorized. You can use any kind of authentication, for example, Google auth.Set up JWT providerUse these lines of code to specify which JWT generation source you prefer to use in your project:// this language is not supported yet.Set up authentication on a server side and generate a JWTCollect your Virgil developer credentialsParameterDescriptionAPP_IDID of your Application at Virgil DashboardAPI_KEY_IDA unique string value that identifies your account at the Virgil developer portalAPI_KEYA Private Key that is used to sign API calls to Virgil Services. For security, you will only be shown the API Private Key when the key is created. Don't forget to save it in a secure location for the next stepNext, you'll set up the JwtGenerator using the Virgil SDK. You'll use your API Key that was created at Virgil Dashboard. For security purposes, you have to generate JWT on your server side. Each JWT is granted access to a specific Application and has a limited lifetime that is configured up by you. However, best practice is to generate JWT for the shortest amount of time feasible for your application.Here is an example of how to generate JWT:// this language is not supported yet.Set up Card VerifierVirgil Card Verifier helps you automatically verify signatures of a User's Card, for example when you get Card from Virgil Cards Service.By default, VirgilCardVerifier verifies only two signatures - those of a Card owner and Virgil Cards Service.Setup VirgilCardVerifier with the following lines of code:// this language is not supported yet.Set up Cards Manager to manage public KeysWith Cards Manager you can:specify an access Token (JWT) Provider.specify a Crypto Library that you’re planning to use for crypto operations.specify a Card Verifier used to verify signatures of your users, your App Server, Virgil Services (optional).Set up CryptoUse the following lines of code to specify which crypto library (Virgil or your own) you prefer to use in your project:// this language is not supported yet.Initialize Card ManagerUse the following lines of code to set up the Card Manager:// this language is not supported yet.Sign then encrypt dataIn order to sign then encrypt data, you need to load a Private Key from a customized Key Storage and get recipient's Card from the Virgil Cards Services.Recipient's Card contains a Public Key on which we will encrypt the data and verify a signature.Use the following code to sign then encrypt data:// this language is not supported yet.Decrypt data then verify signatureOnce the Users receive the signed and encrypted message, they can decrypt it with their own Private Key and verify signature with a Sender's Card.Use the following code to decrypt then verify:// this language is not supported yet.