public AuthenticatorCategory GetAuthenticatorCategory(IAuthenticatorInfo info) { return(CategoryBindings.First(b => b.AuthenticatorSecret == info.Secret && b.CategoryId == CategoryId)); }
private static int GetTotpRemainingProgress(IAuthenticatorInfo auth) { var secondsRemaining = (auth.TimeRenew - DateTime.Now).TotalSeconds; return((int)Math.Ceiling(100d * secondsRemaining / auth.Period)); }
private Authenticator GetAuthenticator(IAuthenticatorInfo info) { return(_all.Find(i => i.Secret == info.Secret)); }