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')
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')
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')
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')