예제 #1
0
 def decode_xpub(self, xpub, message):
     decoded = base64.b64decode(message)
     mpk = xpub.encode('ascii')
     password = hashlib.sha1(mpk).hexdigest()[:32].encode('ascii')
     iv = hashlib.sha256(password).digest()[:16]
     decrypted = aes_decrypt_with_iv(password, iv, decoded)
     return decrypted.decode('utf8')
예제 #2
0
 def decode(self, wallet, message):
     password, iv, wallet_id = self.wallets[wallet]
     decoded = base64.b64decode(message)
     decrypted = aes_decrypt_with_iv(password, iv, decoded)
     return decrypted.decode('utf8')
예제 #3
0
파일: labels.py 프로젝트: asfin/electrum
 def decode(self, wallet, message):
     password, iv, wallet_id = self.wallets[wallet]
     decoded = base64.b64decode(message)
     decrypted = aes_decrypt_with_iv(password, iv, decoded)
     return decrypted.decode('utf8')
예제 #4
0
 def decode(self, wallet: 'Abstract_Wallet', message: str) -> str:
     password, iv, wallet_id = self.wallets[wallet]
     decoded = base64.b64decode(message)
     decrypted = aes_decrypt_with_iv(password, iv, decoded)
     return decrypted.decode('utf8')