Ejemplo n.º 1
0
        public async Task AuthenticateValid()
        {
            var serverPrivID = PrivateIdentity.Create();
            var serverPubID  = new PublicIdentity(serverPrivID.PublicIdentityInfo);
            var clientPrivID = PrivateIdentity.Create();

            var serverAuthenticator = new Authenticator(serverPrivID);
            var clientAuthenticator = new Authenticator(clientPrivID);

            var a = serverAuthenticator.AuthenticateClient(protected1);
            var b = clientAuthenticator.AuthenticateServer(protected2, serverPubID.ID);

            await Task.WhenAll(a, b);
        }