From 3a9a8ed75282a37aa684e3989c7dd69230734530 Mon Sep 17 00:00:00 2001 From: jMyles Date: Sat, 24 Feb 2018 00:48:30 -0800 Subject: [PATCH] Don't need to lookup the actor any more. --- nkms/characters.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nkms/characters.py b/nkms/characters.py index e664f35b8..63f557f2c 100644 --- a/nkms/characters.py +++ b/nkms/characters.py @@ -159,8 +159,7 @@ class Character(object): sign_plaintext=True, ) -> tuple: """ - Looks up recipient actor, finds that actor's pubkey_enc on our keyring, - and encrypts for them. Optionally signs the message as well. + Encrypts plaintext for recipient actor. Optionally signs the message as well. :param recipient: The character whose public key will be used to encrypt cleartext. @@ -172,8 +171,7 @@ class Character(object): :return: A tuple, (ciphertext, signature). If sign==False, then signature will be NOT_SIGNED. """ - actor = self._lookup_actor(recipient) - + recipient_pubkey_enc = recipient.public_key(EncryptingPower) if sign: if sign_plaintext: signature = self.stamp(plaintext)