mirror of https://github.com/nucypher/nucypher.git
Adding classes for tools the Bobs who always decrypt and always fail.
parent
266c00a378
commit
3bf02094a0
|
@ -1,11 +1,11 @@
|
|||
from examples.tdec.demo_utilities.demo_sample_conditions import ten_oclock_florida_time
|
||||
from nucypher.characters.chaotic import BobGonnaBob, NiceGuyEddie
|
||||
from nucypher.characters.chaotic import NiceGuyEddie, _UpAndDownInTheWater
|
||||
|
||||
plaintext = b"PEACE AD DAWN"
|
||||
THIS_IS_NOT_A_TRINKET = 55
|
||||
|
||||
enrico = NiceGuyEddie(encrypting_key=THIS_IS_NOT_A_TRINKET)
|
||||
bob = BobGonnaBob(domain="lynx", eth_provider_uri="Nowhere")
|
||||
bob = _UpAndDownInTheWater(domain="lynx", eth_provider_uri="Nowhere")
|
||||
|
||||
ANYTHING_CAN_BE_PASSED_AS_RITUAL_DATA = 55
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ class NiceGuyEddie(Enrico, DKGOmniscient):
|
|||
return ciphertext
|
||||
|
||||
|
||||
class BobGonnaBob(Bob, DKGOmniscient):
|
||||
class _UpAndDownInTheWater(Bob, DKGOmniscient):
|
||||
"""
|
||||
A Bob that, if the proper knowledge lands in his hands, is all too happy to perform decryption without Ursula.
|
||||
|
||||
|
@ -262,3 +262,15 @@ class BobGonnaBob(Bob, DKGOmniscient):
|
|||
pass
|
||||
|
||||
_ensure_ursula_availability = ensure_ursula_availability_is_of_no_conern_to_anyone
|
||||
|
||||
|
||||
class ThisBobAlwaysDecrypts(_UpAndDownInTheWater):
|
||||
"""
|
||||
A tool for testing success cases.
|
||||
"""
|
||||
|
||||
|
||||
class ThisBobAlwaysFails(_UpAndDownInTheWater):
|
||||
"""
|
||||
A tool for testing interfaces which handle failures from conditions not having been met.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue