コード例 #1
0
 public void Teardown()
 {
     _authenticator = null;
 }
コード例 #2
0
        private bool Authenticate(string cipherText, SecureString password)
        {
            var authenticator = new PasswordAuthenticator(_cryptographyProvider, cipherText)
            {
                AuthenticationRequestor = AuthenticationRequestor
            };

            var authenticated = authenticator.Authenticate(password);

            if (!authenticated) return authenticated;
            _rootNodeInfo.PasswordString = authenticator.LastAuthenticatedPassword.ConvertToUnsecureString();
            return authenticated;
        }
コード例 #3
0
 public void Setup()
 {
     var cryptoProvider = new AeadCryptographyProvider {KeyDerivationIterations = 10000};
     const string cipherText = "MPELiwk7+xeNlruIyt5uxTvVB+/RLVoLdUGnwY4CWCqwKe7T2IBwWo4oaKum5hdv7447g5m2nZsYPrfARSlotQB4r1KZQg==";
     _authenticator = new PasswordAuthenticator(cryptoProvider, cipherText);
 }