Remove padding on Base32 encoded per spec.

This commit is contained in:
Ernest W Durbin III
2018-02-13 19:44:28 -05:00
parent f6186f411e
commit cfbcc97e9d

View File

@@ -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,