From 365dafdb4f3ce7f38761f9a00920c1c7a7407366 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Mon, 13 Jan 2014 00:04:24 +0100 Subject: [PATCH] Fixed padding for base32tohex return value --- qml/lib/crypto.js | 2 +- rpm/harbour-sailotp.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qml/lib/crypto.js b/qml/lib/crypto.js index ca867ae..9cba4f0 100644 --- a/qml/lib/crypto.js +++ b/qml/lib/crypto.js @@ -52,7 +52,7 @@ function base32tohex(base32) { var chunk = bits.substr(i, 4); hex = hex + parseInt(chunk, 2).toString(16) ; } - return hex; + return hex.length % 2 ? hex + "0" : hex; } // Pad Strings to given length diff --git a/rpm/harbour-sailotp.yaml b/rpm/harbour-sailotp.yaml index a48c866..a529c1c 100644 --- a/rpm/harbour-sailotp.yaml +++ b/rpm/harbour-sailotp.yaml @@ -1,7 +1,7 @@ Name: harbour-sailotp Summary: SailOTP Version: 0.4 -Release: 1 +Release: 2 Group: Security URL: https://github.com/seiichiro0185/sailotp/ License: "BSD\t"