mirror of https://github.com/nucypher/nucypher.git
Enrico no longer takes a label.
parent
15e84c6956
commit
9288e618f5
|
@ -1098,9 +1098,8 @@ class Enrico(Character):
|
||||||
|
|
||||||
_default_crypto_powerups = [SigningPower]
|
_default_crypto_powerups = [SigningPower]
|
||||||
|
|
||||||
def __init__(self, policy_pubkey_enc, label, *args, **kwargs):
|
def __init__(self, policy_encrypting_key, *args, **kwargs):
|
||||||
self.policy_pubkey = policy_pubkey_enc
|
self.policy_pubkey = policy_encrypting_key
|
||||||
self.label = label
|
|
||||||
|
|
||||||
# Encrico never uses the blockchain, hence federated_only)
|
# Encrico never uses the blockchain, hence federated_only)
|
||||||
kwargs['federated_only'] = True
|
kwargs['federated_only'] = True
|
||||||
|
@ -1117,6 +1116,11 @@ class Enrico(Character):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_alice(cls, alice: Alice, label: bytes):
|
def from_alice(cls, alice: Alice, label: bytes):
|
||||||
|
"""
|
||||||
|
:param alice: Not a stranger. This is your Alice who will derive the policy keypair, leaving Enrico with the public part.
|
||||||
|
:param label: The label with which to derive the key.
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
policy_pubkey_enc = alice.get_policy_pubkey_from_label(label)
|
policy_pubkey_enc = alice.get_policy_pubkey_from_label(label)
|
||||||
return cls(crypto_power_ups={SigningPower: alice.stamp.as_umbral_pubkey()},
|
return cls(crypto_power_ups={SigningPower: alice.stamp.as_umbral_pubkey()},
|
||||||
policy_pubkey_enc=policy_pubkey_enc, label=label)
|
policy_pubkey_enc=policy_pubkey_enc, label=label)
|
||||||
|
|
Loading…
Reference in New Issue