private static string GetPassword(string secret, long counter, int digits = 6) { return(HashedOneTimePassword.GeneratePassword(secret, counter, digits)); }
public static string GetPassword(string secret, long counter) { return(HashedOneTimePassword.GeneratePassword(secret, counter)); }
public static string GetPassword(string secret, DateTime epoch, int timeStep) { long counter = GetCurrentCounter(DateTime.UtcNow, epoch, timeStep); return(HashedOneTimePassword.GeneratePassword(secret, counter)); }
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