mirror of https://github.com/nucypher/nucypher.git
Don't need to lookup the actor any more.
parent
872cef81a2
commit
3a9a8ed752
|
@ -159,8 +159,7 @@ class Character(object):
|
||||||
sign_plaintext=True,
|
sign_plaintext=True,
|
||||||
) -> tuple:
|
) -> tuple:
|
||||||
"""
|
"""
|
||||||
Looks up recipient actor, finds that actor's pubkey_enc on our keyring,
|
Encrypts plaintext for recipient actor. Optionally signs the message as well.
|
||||||
and encrypts for them. Optionally signs the message as well.
|
|
||||||
|
|
||||||
:param recipient: The character whose public key will be used to encrypt
|
:param recipient: The character whose public key will be used to encrypt
|
||||||
cleartext.
|
cleartext.
|
||||||
|
@ -172,8 +171,7 @@ class Character(object):
|
||||||
:return: A tuple, (ciphertext, signature). If sign==False,
|
:return: A tuple, (ciphertext, signature). If sign==False,
|
||||||
then signature will be NOT_SIGNED.
|
then signature will be NOT_SIGNED.
|
||||||
"""
|
"""
|
||||||
actor = self._lookup_actor(recipient)
|
recipient_pubkey_enc = recipient.public_key(EncryptingPower)
|
||||||
|
|
||||||
if sign:
|
if sign:
|
||||||
if sign_plaintext:
|
if sign_plaintext:
|
||||||
signature = self.stamp(plaintext)
|
signature = self.stamp(plaintext)
|
||||||
|
|
Loading…
Reference in New Issue