Commits

Devin Martin committed 873278e

comments

Comments (0)

Files changed (3)

OtpSharp/OtpHashMode.cs

 namespace OtpSharp
 {
     /// <summary>
-    /// Indicates which HMAC hash should be used
+    /// Indicates which HMAC hashing algorithm should be used
     /// </summary>
     public enum OtpHashMode
     {

OtpSharp/TimeCorrection.cs

     /// In cases where the local system time is incorrect it is preferable to simply correct the system time.
     /// This class is provided to handle cases where it isn't possible for the client, the server, or both, to be on the correct time.
     /// 
-    /// This library provides facilities to to ping NIST for a correct network time.  This class can be used manually however in cases where a server's time is off
+    /// This library provides limited facilities to to ping NIST for a correct network time.  This class can be used manually however in cases where a server's time is off
     /// and the consumer of this library can't control it.  In that case create an instance of this class and provide the current server time as the correct time parameter
+    /// 
+    /// This class is immutable and therefore threadsafe
     /// </remarks>
     public class TimeCorrection
     {
             this.step = step;
             this.hashMode = mode;
             this.totpSize = totpSize;
+
+            // we never null check the corrected time object.  Since it's readonly, we'll ensure that it isn't null here and provide neatral functionality in this case.
             this.correctedTime = timeCorrection ?? TimeCorrection.UncorrectedInstance;
         }
 
             this.step = step;
             this.hashMode = mode;
             this.totpSize = totpSize;
+
+            // we never null check the corrected time object.  Since it's readonly, we'll ensure that it isn't null here and provide neatral functionality in this case.
             this.correctedTime = timeCorrection ?? TimeCorrection.UncorrectedInstance;
         }