Encode WIF string before passing to highlevelcrypto.decodeWalletImportFormat()
This commit is contained in:
parent
acab92c561
commit
d547a8be2f
|
@ -201,10 +201,11 @@ class singleWorker(StoppableThread):
|
||||||
'Could not read or decode privkey for address %s', address)
|
'Could not read or decode privkey for address %s', address)
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
privSigningKeyHex = hexlify(
|
privSigningKeyHex = hexlify(highlevelcrypto.decodeWalletImportFormat(
|
||||||
highlevelcrypto.decodeWalletImportFormat(privSigningKeyBase58))
|
privSigningKeyBase58.encode()))
|
||||||
privEncryptionKeyHex = hexlify(
|
privEncryptionKeyHex = hexlify(
|
||||||
highlevelcrypto.decodeWalletImportFormat(privEncryptionKeyBase58))
|
highlevelcrypto.decodeWalletImportFormat(
|
||||||
|
privEncryptionKeyBase58.encode()))
|
||||||
|
|
||||||
# The \x04 on the beginning of the public keys are not sent.
|
# The \x04 on the beginning of the public keys are not sent.
|
||||||
# This way there is only one acceptable way to encode
|
# This way there is only one acceptable way to encode
|
||||||
|
@ -1113,7 +1114,7 @@ class singleWorker(StoppableThread):
|
||||||
continue
|
continue
|
||||||
privEncryptionKeyHex = hexlify(
|
privEncryptionKeyHex = hexlify(
|
||||||
highlevelcrypto.decodeWalletImportFormat(
|
highlevelcrypto.decodeWalletImportFormat(
|
||||||
privEncryptionKeyBase58))
|
privEncryptionKeyBase58.encode()))
|
||||||
pubEncryptionKeyBase256 = unhexlify(highlevelcrypto.privToPub(
|
pubEncryptionKeyBase256 = unhexlify(highlevelcrypto.privToPub(
|
||||||
privEncryptionKeyHex))[1:]
|
privEncryptionKeyHex))[1:]
|
||||||
requiredAverageProofOfWorkNonceTrialsPerByte = \
|
requiredAverageProofOfWorkNonceTrialsPerByte = \
|
||||||
|
|
|
@ -102,8 +102,8 @@ def reloadMyAddressHashes():
|
||||||
# Returns a simple 32 bytes of information encoded in 64 Hex characters
|
# Returns a simple 32 bytes of information encoded in 64 Hex characters
|
||||||
try:
|
try:
|
||||||
privEncryptionKey = hexlify(
|
privEncryptionKey = hexlify(
|
||||||
highlevelcrypto.decodeWalletImportFormat(
|
highlevelcrypto.decodeWalletImportFormat(config.get(
|
||||||
config.get(addressInKeysFile, 'privencryptionkey')
|
addressInKeysFile, 'privencryptionkey').encode()
|
||||||
))
|
))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|
Reference in New Issue
Block a user