Skip to content

Commit

Permalink
Update totp.ps1
Browse files Browse the repository at this point in the history
removed redundant $counter assignment that was causing issues.
  • Loading branch information
smood922 authored Feb 8, 2024
1 parent 336e257 commit a4a18db
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion TOTP/totp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function Get-OTPRemainingSeconds ([int32]$WINDOW = 30) {
$span = New-TimeSpan -Start $EPOCH -End (Get-Date).ToUniversalTime()
$seconds = [math]::floor($span.TotalSeconds)
$counter = [math]::floor($seconds / $WINDOW)
$counter = [Convert]::ToInt32($seconds / $WINDOW)

$nextTimeStep = ($counter + 1)*$WINDOW
$difference = $nextTimeStep - $seconds
Expand Down

0 comments on commit a4a18db

Please sign in to comment.