From 89e74f390bf6e710de51fdc22ab41b559ca7b751 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 24 Apr 2014 20:43:13 -0600 Subject: [PATCH] Add doc.go, finish YubiKey removal. --- doc.go | 5 +++++ otp.go | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 doc.go diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..6f1eef8 --- /dev/null +++ b/doc.go @@ -0,0 +1,5 @@ +// twofactor implements two-factor authentication. +// +// Currently supported are RFC 4226 HOTP one-time passwords and +// RFC 6238 TOTP SHA-1 one-time passwords. +package twofactor diff --git a/otp.go b/otp.go index 02e82ba..9d2faaf 100644 --- a/otp.go +++ b/otp.go @@ -58,9 +58,8 @@ func otpString(otp OTP) string { typeName = "OATH-HOTP" case OATH_TOTP: typeName = "OATH-TOTP" - case YUBIKEY: - return fmt.Sprintf("YubiKey with %d byte public identity", - len(otp.(*YubiKey).Public())) + default: + typeName = "UNKNOWN" } return fmt.Sprintf("%s, %d", typeName, otp.Size()) }