summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Jennings <Stephen.G.Jennings@gmail.com>2011-11-12 23:35:07 -0800
committerStephen Jennings <Stephen.G.Jennings@gmail.com>2011-11-13 13:15:31 -0800
commit594166213822635486e63e4085486c5f736ece4c (patch)
tree67f4117626464f564cd27a39080ed4cd8ec30e9c
parentb94916571fbc845cdbe5a688b32c7e8f88c2fdd3 (diff)
downloadOATH.Net-594166213822635486e63e4085486c5f736ece4c.zip
OATH.Net-594166213822635486e63e4085486c5f736ece4c.tar.gz
OATH.Net-594166213822635486e63e4085486c5f736ece4c.tar.bz2
Update usage.
-rw-r--r--README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 62f59f8..e4b5ebe 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,8 @@ OATH.Net is a .NET library to perform OATH authentication.
int otpDigits = 8;
int counterValue = user.NextCounterValue();
- CounterBasedOtp otp = new CounterBasedOtp(secretKey, otpDigits);
+ Key key = new Key(secretKey);
+ CounterBasedOtpGenerator otp = new CounterBasedOtpGenerator(key, otpDigits);
string validCode = otp.ComputeOtp(counterValue);
return userSuppliedCode == validCode;
@@ -28,7 +29,8 @@ OATH.Net is a .NET library to perform OATH authentication.
string secretKey = user.SecretKey;
int otpDigits = 8;
- TimeBasedOtp otp = new TimeBasedOtp(secretKey, otpDigits);
+ Key key = new Key(secretKey);
+ TimeBasedOtpGenerator otp = new TimeBasedOtpGenerator(key, otpDigits);
string validCode = otp.ComputeOtp(DateTime.UtcNow);
return userSuppliedCode == validCode;