private void SetupWithInMemoryKeyStores() { var publicKeyStore = new InMemoryPublicKeyStore(); _publicKey = publicKeyStore.GetAsync().GetAwaiter().GetResult(); var privateKeyStore = new InMemoryPrivateKeyStore(); _privateKey = privateKeyStore.GetAsync().GetAwaiter().GetResult(); }
public ProtocolTests() { // Import parameters for the elliptic curve prime256v1 _ecParameters = CustomNamedCurves.GetByOid(X9ObjectIdentifiers.Prime256v1); var publicKeyStore = new InMemoryPublicKeyStore(); _publicKey = publicKeyStore.GetAsync().GetAwaiter().GetResult(); var privateKeyStore = new InMemoryPrivateKeyStore(); _privateKey = privateKeyStore.GetAsync().GetAwaiter().GetResult(); _wrongPrivateKey = _privateKey.Add(BigInteger.One); _initiator = new Initiator(); _tokenGenerator = new TokenGenerator(); _tokenVerifier = new TokenVerifier(new InMemorySeedStore()); }