本文整理汇总了Python中wallet.pw_decode函数的典型用法代码示例。如果您正苦于以下问题:Python pw_decode函数的具体用法?Python pw_decode怎么用?Python pw_decode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pw_decode函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_private_key
def get_private_key(self, sequence, wallet, password):
from wallet import pw_decode
for_change, i = sequence
assert for_change == 0
address = self.get_addresses(0)[i]
pk = pw_decode(self.keypairs[address][1], password)
# this checks the password
assert address == address_from_private_key(pk,
addrtype = self.active_chain.p2pkh_version,
wif_version = self.active_chain.wif_version)
return [pk]
示例2: update_password
def update_password(self, old_password, new_password):
for k, v in self.keypairs.items():
pubkey, a = v
b = pw_decode(a, old_password)
c = pw_encode(b, new_password)
self.keypairs[k] = (pubkey, c)