/// <summary> /// Initializes a new instance of the <see cref="CardValidator"/> class. /// </summary> public CardValidator(ICrypto crypto) { this.crypto = crypto; var servicePublicKey = crypto.ImportPublicKey(Convert.FromBase64String(ServicePublicKey)); this.verifiers = new Dictionary <string, IPublicKey> { [ServiceCardId] = servicePublicKey }; }
/// <summary> /// Add default service verifiers to validator /// </summary> public void AddDefaultVerifiers() { var servicePublicKey = crypto.ImportPublicKey(Convert.FromBase64String(ServicePublicKey)); this.verifiers.Add(ServiceCardId, servicePublicKey); }