File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ def prompt_pin():
185185 only_key .setslot (slot_id , MessageField .TFATYPE , sys .argv [4 ])
186186 elif sys .argv [3 ] == 'gkey' :
187187 totpkey = prompt_key ()
188- totpkey = base64 .b32decode (totpkey )
188+ totpkey = base64 .b32decode ("" . join ( totpkey . split ()). upper () )
189189 totpkey = binascii .hexlify (totpkey )
190190 # pad with zeros for even digits
191191 totpkey = totpkey .zfill (len (totpkey ) + len (totpkey ) % 2 )
@@ -419,7 +419,7 @@ def mprompt():
419419 only_key .setslot (slot_id , MessageField .TFATYPE , data [3 ])
420420 elif data [2 ] == 'gkey' :
421421 totpkey = prompt_key ()
422- totpkey = base64 .b32decode (totpkey )
422+ totpkey = base64 .b32decode ("" . join ( totpkey . split ()). upper () )
423423 totpkey = binascii .hexlify (totpkey )
424424 # pad with zeros for even digits
425425 totpkey = totpkey .zfill (len (totpkey ) + len (totpkey ) % 2 )
You can’t perform that action at this time.
0 commit comments