def __init__(self, enclave_info): # initialize the keys that can be used later to try: self.nonce = enclave_info['nonce'] self.sealed_data = enclave_info['sealed_data'] self.verifying_key = enclave_info['verifying_key'] self.encryption_key = enclave_info['encryption_key'] self.proof_data = enclave_info['proof_data'] self.enclave_id = enclave_info['enclave_id'] except KeyError as ke: raise Exception( "missing enclave initialization parameter; {}".format(str(ke))) self.enclave_keys = keys.EnclaveKeys(self.verifying_key, self.encryption_key)
def __init__(self, enclave_info, txn_keys, block_store = None) : # initialize the keys that can be used later to # register the enclave with the ledger self.txn_keys = txn_keys try : self.nonce = enclave_info['nonce'] self.sealed_data = enclave_info['sealed_data'] self.interpreter = enclave_info['interpreter'] self.verifying_key = enclave_info['verifying_key'] self.encryption_key = enclave_info['encryption_key'] self.proof_data = enclave_info['proof_data'] self.enclave_id = enclave_info['enclave_id'] except KeyError as ke : raise Exception("missing enclave initialization parameter; {}".format(str(ke))) self.enclave_keys = keys.EnclaveKeys(self.verifying_key, self.encryption_key) if block_store : self.attach_block_store(block_store)