C# Class KeeTrayTOTP.Libraries.TimeCorrectionProvider

Provides time correction for Time-based One Time Passwords that require accurate DateTime syncronisation with server.
ファイルを表示 Open project: victor-rds/KeeTrayTOTP Class Usage Examples

Public Methods

Method Description
CheckNow ( bool ResetTimer = true, bool ForceCheck = false ) : bool

Perform a time correction check, may a few seconds.

TimeCorrectionProvider ( string Url, bool Enable = true ) : System

Instanciates a new TOTP_TimeCorrection using the specified URL to contact the server.

Private Methods

Method Description
Task_Do ( ) : bool

Instanciates a new task and starts it.

Task_Thread ( ) : void

Event that occurs when the timer has reached the required value. Attempts to get time correction from the server.

Timer_Elapsed ( object sender, EventArgs e ) : void

Task that occurs every time the timer's interval has elapsed.

Method Details

CheckNow() public method

Perform a time correction check, may a few seconds.
public CheckNow ( bool ResetTimer = true, bool ForceCheck = false ) : bool
ResetTimer bool Resets the timer to 0. Occurs even if the attempt to attempt a new time correction fails.
ForceCheck bool Attempts to get time correction even if disabled.
return bool

TimeCorrectionProvider() public method

Instanciates a new TOTP_TimeCorrection using the specified URL to contact the server.
public TimeCorrectionProvider ( string Url, bool Enable = true ) : System
Url string URL of the server to get check.
Enable bool Enable or disable the time correction check.
return System