Don't need to lookup the actor any more.

pull/171/head
jMyles 2018-02-24 00:48:30 -08:00
parent 872cef81a2
commit 3a9a8ed752
1 changed files with 2 additions and 4 deletions

View File

@ -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)