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

            return(HashedOneTimePassword.GeneratePassword(secret, counter));
        }
示例#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