def authenticate_person(recipient_id): key = util.gpg_decrypt(app.gpg, request.data, config.SERVER_PASSPHRASE) key2 = util.generate_random_string(32) body = {'key': str(key), 'key2': key2} msg = json.dumps(body) server_fp = util.get_fp_from_gpg(app.gpg, config.SERVER_KEY_FP) encrypted = util.gpg_encrypt(app.gpg, server_fp, msg, recipient_id, config.SERVER_PASSPHRASE) return str(encrypted), 200
def _decrypt(self, message): decrypted_data = util.gpg_decrypt( self.gpg, str(message), passphrase=self.passphrase) return decrypted_data
def _decrypt(self, message): decrypted_data = util.gpg_decrypt(self.gpg, str(message), passphrase=self.passphrase) return decrypted_data