public async Task SearchForVirgilCards_ValidationWithServiceKey_ShouldPassValidation() { var crypto = new VirgilCrypto(); var client = IntegrationHelper.GetVirgilClient(); client.SetCardValidator(new CardValidator(crypto)); // CREATING A VIRGIL CARD var appKey = crypto.ImportPrivateKey(IntegrationHelper.AppKey, IntegrationHelper.AppKeyPassword); var aliceKeys = crypto.GenerateKeys(); var exportedPublicKey = crypto.ExportPublicKey(aliceKeys.PublicKey); var aliceIdentity = "alice-" + Guid.NewGuid(); var request = new PublishCardRequest(aliceIdentity, "member", exportedPublicKey); var requestSigner = new RequestSigner(crypto); requestSigner.SelfSign(request, aliceKeys.PrivateKey); requestSigner.AuthoritySign(request, IntegrationHelper.AppID, appKey); var aliceCard = await client.PublishCardAsync(request); // VALIDATING A VIRGIL CARD var cards = await client.SearchCardsAsync(SearchCriteria.ByIdentity(aliceIdentity)); aliceCard.ShouldBeEquivalentTo(cards.Single()); await IntegrationHelper.RevokeCard(aliceCard.Id); }