示例#1
0
        public void AmoredTest()
        {
            var rsa = new KeyPairRSA(0x800); //, "StrengGeheim");

            var a = rsa.AmoredPrivateKey;
            var b = rsa.Base64PublicKey;
        }
示例#2
0
        public void FileTest()
        {
            var rsa = new KeyPairRSA();

            rsa.WritePrivateKey(@"c:\Program Files\Siedle\Access AS 670-02\server\data\ssh\private.ossh");
            rsa.WritePublicKey(@"c:\Program Files\Siedle\Access AS 670-02\server\data\ssh\public");
        }
示例#3
0
        public void IvTest()
        {
            var rsa = new KeyPairRSA(2048);

            Expect(rsa.Iv.Length, Is.EqualTo(8));
        }
示例#4
0
        public void KeyTest()
        {
            var rsa = new KeyPairRSA(2048, "StrengGeheim");

            Expect(rsa.Key.Length, Is.EqualTo(24));
        }