From cfbcc97e9d2de75d943b8651b2bab5990185e5c1 Mon Sep 17 00:00:00 2001 From: Ernest W Durbin III Date: Tue, 13 Feb 2018 19:44:28 -0500 Subject: [PATCH] Remove padding on Base32 encoded per spec. --- decrypt_otpauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decrypt_otpauth.py b/decrypt_otpauth.py index 5b7aeea..8598948 100644 --- a/decrypt_otpauth.py +++ b/decrypt_otpauth.py @@ -122,7 +122,7 @@ class OTPAccount: otp_type = self.type.uri_value otp_label = quote(f'{self.issuer}:{self.label}') otp_parameters = { - 'secret': base64.b32encode(self.secret).decode("utf-8"), + 'secret': base64.b32encode(self.secret).decode("utf-8").rstrip("="), 'algorithm': self.algorithm, 'period': self.period, 'digits': self.digits,