mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Verify signatures using CLI
This commit is contained in:
parent
9034449e96
commit
2e74b73ba0
2 changed files with 10 additions and 0 deletions
|
@ -165,6 +165,12 @@ class Config(object):
|
|||
action.add_argument('message', help='Message to sign')
|
||||
action.add_argument('privatekey', help='Private key')
|
||||
|
||||
# Crypt Verify
|
||||
action = self.subparsers.add_parser("cryptVerify", help='Verify message using Bitcoin public address')
|
||||
action.add_argument('message', help='Message to verify')
|
||||
action.add_argument('sign', help='Signiture for message')
|
||||
action.add_argument('address', help='Signer\'s address')
|
||||
|
||||
action = self.subparsers.add_parser("getConfig", help='Return json-encoded info')
|
||||
|
||||
# Config parameters
|
||||
|
|
|
@ -416,6 +416,10 @@ class Actions(object):
|
|||
from Crypt import CryptBitcoin
|
||||
print CryptBitcoin.sign(message, privatekey)
|
||||
|
||||
def cryptVerify(self, message, sign, address):
|
||||
from Crypt import CryptBitcoin
|
||||
print CryptBitcoin.verify(message, address, sign)
|
||||
|
||||
# Peer
|
||||
def peerPing(self, peer_ip, peer_port=None):
|
||||
if not peer_port:
|
||||
|
|
Loading…
Reference in a new issue