mirror of https://github.com/nucypher/nucypher.git
Finish deprecatetion of Bob.join_plolicy (from examples).
parent
85a62c53d2
commit
edd5a5c2f9
|
@ -118,9 +118,7 @@ del alice
|
|||
# Bob the BUIDLer ##
|
||||
#####################
|
||||
|
||||
bob.join_policy(label, alice_verifying_key)
|
||||
|
||||
# Now that Bob has joined the Policy, let's show how Enrico the Encryptor
|
||||
# Now let's show how Enrico the Encryptor
|
||||
# can share data with the members of this Policy and then how Bob retrieves it.
|
||||
# In order to avoid re-encrypting the entire book in this demo, we only read some lines.
|
||||
with open(BOOK_PATH, 'rb') as file:
|
||||
|
|
|
@ -88,11 +88,7 @@ policy_pubkey = PublicKey.from_bytes(bytes.fromhex(policy_data["policy_pubkey"])
|
|||
alices_sig_pubkey = PublicKey.from_bytes(bytes.fromhex(policy_data["alice_sig_pubkey"]))
|
||||
label = policy_data["label"].encode()
|
||||
|
||||
print("The Doctor joins policy for label '{}'".format(label.decode("utf-8")))
|
||||
doctor.join_policy(label, alices_sig_pubkey)
|
||||
|
||||
# Now that the Doctor joined the policy in the NuCypher network,
|
||||
# he can retrieve encrypted data which he can decrypt with his private key.
|
||||
# The Doctor can retrieve encrypted data which he can decrypt with his private key.
|
||||
# But first we need some encrypted data!
|
||||
# Let's read the file produced by the heart monitor and unpack the MessageKits,
|
||||
# which are the individual ciphertexts.
|
||||
|
|
Loading…
Reference in New Issue