public class ReadInstance extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ContractId |
| Constructor and Description |
|---|
ReadInstance(CalypsoRPC calypso,
WriteInstance write,
List<Signer> signers,
List<Long> signerCtrs,
Point Xc)
Create a new ReadInstance to request access to an encrypted document.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decryptKeyMaterial(Scalar reader)
Decrypts the key material by creating the read and write proofs necessary
for the LTS to allow a re-encryption to the public key stored in the
read request.
|
static ReadInstance |
fromByzCoin(CalypsoRPC calypso,
InstanceId id)
Constructor used to connect to an existing instance.
|
Instance |
getInstance()
Get the instance object.
|
ReadData |
getRead() |
public static String ContractId
public ReadInstance(CalypsoRPC calypso, WriteInstance write, List<Signer> signers, List<Long> signerCtrs, Point Xc) throws CothorityException
calypso - The CalypsoRPC object.write - The write instance where a new read instance should be spawned from.signers - Signers who are allowed to spawn a new instance.signerCtrs - a list of monotonically increasing counter for every signerXc - is the key to which the dataEnc will be re-encrypted to, it must not be one of the signersCothorityException - if something goes wrongpublic Instance getInstance()
public ReadData getRead() throws CothorityNotFoundException
CothorityNotFoundException - if the requested instance cannot be foundpublic byte[] decryptKeyMaterial(Scalar reader) throws CothorityException
reader - is the corresponding private key of the publicCothorityException - if something goes wrongpublic static ReadInstance fromByzCoin(CalypsoRPC calypso, InstanceId id) throws CothorityException
calypso - The CalypsoRPC object.id - The id of the instance.CothorityException - if something goes wrongCopyright © 2019. All rights reserved.