public class WriteData extends Object
- EncData - the encrypted data, should be smaller than 8MB - U, Ubar, E, F, Cs - the symmetric key used to encrypt the data, itself encrypted to the Long Term Secret key - ExtraData - plain text data that is stored as-is on the ledger - LTSID - the Long Term Secret ID used to encrypt the data
| Constructor and Description |
|---|
WriteData(LTS lts,
byte[] dataEnc,
byte[] keyMaterial,
byte[] extraData,
DarcId publisher)
Create a new document by giving all possible parameters.
|
| Modifier and Type | Method and Description |
|---|---|
static WriteData |
fromByzcoin(ByzCoinRPC bc,
InstanceId id)
Recreates a WriteData from an instanceid.
|
static WriteData |
fromInstance(Instance inst)
Recreates a WriteData from an instance.
|
byte[] |
getDataEnc()
Get the encrypted data.
|
byte[] |
getExtraData()
Get the extra data.
|
Calypso.Write |
getWrite() |
public WriteData(LTS lts, byte[] dataEnc, byte[] keyMaterial, byte[] extraData, DarcId publisher) throws CothorityException
lts - Long Term Secret parametersdataEnc - The ciphertext which will be stored _as is_ on ByzCoin.keyMaterial - The symmetric key plus eventually an IV. This will be encrypted under the shared symmetricKey
of the cothority.extraData - data that will _not be encrypted_ but will be visible in cleartext on ByzCoin.publisher - The darc with a rule for calypsoWrite and calypsoRead.CothorityExceptionpublic static WriteData fromByzcoin(ByzCoinRPC bc, InstanceId id) throws CothorityNotFoundException, CothorityCommunicationException
bc - a running Byzcoin serviceid - an instanceId of a WriteInstancecom.google.protobuf.InvalidProtocolBufferExceptionCothorityNotFoundExceptionCothorityCommunicationExceptionpublic static WriteData fromInstance(Instance inst) throws CothorityNotFoundException
inst - an instance representing a WriteDataCothorityNotFoundExceptionpublic byte[] getDataEnc()
public byte[] getExtraData()
public Calypso.Write getWrite()
Copyright © 2018. All rights reserved.