private static MTProtoClientBuilder CreateDefault()
        {
            var clientTransportFactory = new ClientTransportFactory();
            var tlRig = new TLRig();
            var messageIdGenerator = new MessageIdGenerator();
            var hashServices = new HashServices();
            var encryptionServices = new EncryptionServices();
            var randomGenerator = new RandomGenerator();
            var messageCodec = new MessageCodec(tlRig, hashServices, encryptionServices, randomGenerator);
            var keyChain = new KeyChain(tlRig, hashServices);
            var nonceGenerator = new NonceGenerator();

            return new MTProtoClientBuilder(clientTransportFactory,
                tlRig,
                messageIdGenerator,
                messageCodec,
                hashServices,
                encryptionServices,
                nonceGenerator,
                keyChain);
        }
 public void Should_encrypt_RSA()
 {
     var es = new EncryptionServices();
     var encryptedData = es.RSAEncrypt(DataWithHash, RSAKey);
     encryptedData.Should().Equal(EncryptedData);
 }
 public void Should_encrypt_Aes256Ige()
 {
     var es = new EncryptionServices();
     byte[] encryptedData = es.Aes256IgeEncrypt(TestData.ServerDHInnerDataWithHash, TestData.TmpAesKey, TestData.TmpAesIV);
     encryptedData.Should().Equal(TestData.ServerDHParamsOkEncryptedAnswer);
 }