Ejemplo n.º 1
0
        public void CorrectEncryptKeyTest()
        {
            var context = new CryptoContext(
                GetPasswordCallback,
                @"C:\projects\OutlookPrivacyPlugin\Deja.Crypto.Test\pubring.gpg",
                @"C:\projects\OutlookPrivacyPlugin\Deja.Crypto.Test\secring.gpg",
                "rsa", "sha-1");
            var crypto = new PgpCrypto(context);

            var key = crypto.GetSecretKeyForEncryption("*****@*****.**");

            Assert.AreEqual(long.Parse("BED5C89E8F3ABF8E", NumberStyles.HexNumber), key.KeyId);
        }