Beispiel #1
0
 private static string GetPassword(string secret, long counter, int digits = 6)
 {
     return(HashedOneTimePassword.GeneratePassword(secret, counter, digits));
 }
Beispiel #2
0
 public static string GetPassword(string secret, long counter)
 {
     return(HashedOneTimePassword.GeneratePassword(secret, counter));
 }
Beispiel #3
0
        public static string GetPassword(string secret, DateTime epoch, int timeStep)
        {
            long counter = GetCurrentCounter(DateTime.UtcNow, epoch, timeStep);

            return(HashedOneTimePassword.GeneratePassword(secret, counter));
        }
Beispiel #4
0
        public static string GetPassword(string secret, DateTime now, DateTime epoch, int timeStep, int digits)
        {
            long counter = GetCurrentCounter(now, epoch, timeStep);

            return(HashedOneTimePassword.GeneratePassword(secret, counter, digits));
        }
        } // end GetPassword

        private static string GetPassword(string secret, long counter)
        {
            return HashedOneTimePassword.GeneratePassword(secret, counter);
        } // end GetPassword