mirror of https://github.com/nucypher/nucypher.git
DataSource now automatically generates a signer - not sure how we want to generate this keypair. See #241.
parent
b1ed0a7736
commit
d32f290d6b
|
@ -1,10 +1,14 @@
|
|||
from nkms.crypto.api import encrypt_and_sign
|
||||
|
||||
from nkms.crypto.signature import SignatureStamp
|
||||
from nkms.keystore.keypairs import SigningKeypair
|
||||
from constant_sorrow.constants import NO_SIGNING_POWER
|
||||
|
||||
class DataSource:
|
||||
|
||||
def __init__(self, policy_pubkey_enc, signer):
|
||||
def __init__(self, policy_pubkey_enc, signer=NO_SIGNING_POWER):
|
||||
self._policy_pubkey_enc = policy_pubkey_enc
|
||||
if signer is NO_SIGNING_POWER:
|
||||
signer = SignatureStamp(SigningKeypair()) # TODO: Generate signing key properly. #241
|
||||
self.stamp = signer
|
||||
|
||||
def encapsulate_single_message(self, message):
|
||||
|
|
Loading…
Reference in New Issue