Skip to content

Commit

Permalink
Move comments above code in README.markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
reedy committed Dec 28, 2020
1 parent da46519 commit ff2f13d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ Who wouldn't love a simple drop-in class for HMAC Based One Time Passwords? It's
```php
use jakobo\HOTP\HOTP;

$result = HOTP::generateByCounter( $key, $counter ); // event based
// event based
$result = HOTP::generateByCounter( $key, $counter );

$result = HOTP::generateByTime( $key, $window ); // time based within a "window" of time
$result = HOTP::generateByTimeWindow( $key, $window, $min, $max ); // same as generateByTime, but for $min windows before and $max windows after
// time based within a "window" of time
$result = HOTP::generateByTime( $key, $window );

// same as generateByTime, but for $min windows before and $max windows after
$result = HOTP::generateByTimeWindow( $key, $window, $min, $max );
```

with `$result`, you can do all sorts of neat things...
Expand All @@ -33,5 +37,6 @@ $result->toHex();

$result->doDec();

$result->toHotp( $length ); // how many digits in your OTP?
// how many digits in your OTP?
$result->toHotp( $length );
```

0 comments on commit ff2f13d

Please sign in to comment.