work on peer encryption

master
Kevin Froman 2018-02-08 16:58:39 -06:00
parent a0dc95c291
commit 297cac81ae
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B
3 changed files with 8 additions and 3 deletions

View File

@ -133,9 +133,9 @@ class API:
elif action == 'ping': elif action == 'ping':
resp = Response("pong!") resp = Response("pong!")
elif action == 'getHMAC': elif action == 'getHMAC':
resp = Response(self._crypto.generateHMAC()) resp = Response(self._crypto.generateSymmetric())
elif action == 'getSymmetric': elif action == 'getSymmetric':
pass resp = Response(self._crypto.generateSymmetric())
elif action == 'getDBHash': elif action == 'getDBHash':
resp = Response(self._utils.getBlockDBHash()) resp = Response(self._utils.getBlockDBHash())
elif action == 'getBlockHashes': elif action == 'getBlockHashes':

View File

@ -161,6 +161,7 @@ class Onionr:
logger.error('Invalid peer ID') logger.error('Invalid peer ID')
message = logger.readline("Enter a message: ") message = logger.readline("Enter a message: ")
logger.info("Sending message to " + peer) logger.info("Sending message to " + peer)
self.onionrUtils.sendPM(peer, message)
def openGUI(self): def openGUI(self):

View File

@ -36,4 +36,8 @@ class OnionrCrypto:
def verifyPGP(self, peer, signature): def verifyPGP(self, peer, signature):
'''Verify PGP signed data''' '''Verify PGP signed data'''
gpg = gnupg.GPG(homedir=self._core.gpgHome) gpg = gnupg.GPG(homedir=self._core.gpgHome)
def generateSymmetric():
return
def generateHMAC():
return