Esempio 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);
            }
        }
Esempio 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);
            }
        }
Esempio n. 3
0
 protected override void OnLoad(SshDataWorker reader)
 {
     this.E = reader.ReadMpint();
 }
 protected override void OnLoad(SshDataWorker reader)
 {
     E = reader.ReadMpint();
 }