diff options
| author | mo khan <mokhan@users.noreply.github.com> | 2016-11-18 10:29:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-18 10:29:33 -0700 |
| commit | 172e3dfb7ff0ebec111a8349daddd50ad86648aa (patch) | |
| tree | 216abfe1666126bda23cc2b27e5222c4e8f0ec9e /lib/tfa/totp_command.rb | |
| parent | 6301ea64a649212838a449e7f11af91f72bd5263 (diff) | |
| parent | 32938166ecb1d446101f0b312a3ba4635a010bdc (diff) | |
Merge pull request #6 from mokhan/GH-3v0.0.12
Add a command to remove a secret.
Diffstat (limited to 'lib/tfa/totp_command.rb')
| -rw-r--r-- | lib/tfa/totp_command.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/tfa/totp_command.rb b/lib/tfa/totp_command.rb index 8dd0125..14bc064 100644 --- a/lib/tfa/totp_command.rb +++ b/lib/tfa/totp_command.rb @@ -12,11 +12,9 @@ module TFA private def password_for(secret) - begin - ::ROTP::TOTP.new(secret).now - rescue - "???" - end + ::ROTP::TOTP.new(secret).now + rescue ROTP::Base32::Base32Error + "INVALID SECRET" end def all_passwords |
