Example #1
0
 def get_passphrase(available_on_device: bool) -> str:
     passphrase = ask_for_pass_callback(available_on_device)
     if passphrase is hw_common.PASSPHRASE_ON_DEVICE:
         return PASSPHRASE_ON_DEVICE
     else:
         if passphrase is None:
             raise exceptions.Cancelled
         return passphrase
Example #2
0
 def get_passphrase(self) -> str:
     passphrase = ask_for_pass_callback()
     if passphrase is None:
         raise exceptions.Cancelled
     return passphrase