Exemplo n.º 1
0
        public override void LoadKeyAndCertificatesData(byte[] data)
        {
            using (var worker = new SshDataWorker(data))
            {
                if (worker.ReadString(Encoding.ASCII) != this.Name)
                    throw new CryptographicException("Key and certificates were not created with this algorithm.");

                var args = new RSAParameters();
                args.Exponent = worker.ReadMpint();
                args.Modulus = worker.ReadMpint();

                _algorithm.ImportParameters(args);
            }
        }
Exemplo n.º 2
0
        public override void LoadKeyAndCertificatesData(byte[] data)
        {
            using (var worker = new SshDataWorker(data))
            {
                if (worker.ReadString(Encoding.ASCII) != this.Name)
                {
                    throw new CryptographicException("Key and certificates were not created with this algorithm.");
                }

                var args = new RSAParameters();
                args.Exponent = worker.ReadMpint();
                args.Modulus  = worker.ReadMpint();

                _algorithm.ImportParameters(args);
            }
        }
Exemplo n.º 3
0
 protected override void OnLoad(SshDataWorker reader)
 {
     this.E = reader.ReadMpint();
 }
Exemplo n.º 4
0
 protected override void OnLoad(SshDataWorker reader)
 {
     E = reader.ReadMpint();
 }