Creating an envelope
Message envelopes
ArrayList<PublicKey> recipientPublicKeys = new ArrayList<>(); recipientPublicKeys.add(publicKey1); recipientPublicKeys.add(publicKey2); ... Record envelopeRecord = keyPair.createMessageEnvelope(messagingStoreUrl, messageRecord, recipientPublicKeys, expires); CondensationObject envelopeObject = envelopeRecord.toObject(); Hash envelopeHash = envelopeObject.calculateHash();
var recipientPublicKeys = [publicKey1, publicKey2, ...]; var envelopeRecord = keyPair.createMessageEnvelope(messagingStoreUrl, messageRecord, recipientPublicKeys, expires); var envelopeObject = envelopeRecord.toObject(); var envelopeHash = envelopeObject.calculateHash();
my $recipientPublicKeys = [$publicKey1, $publicKey2, ...]; my $envelopeRecord = $keyPair->createMessageEnvelope($messagingStoreUrl, $messageRecord, $recipientPublicKeys, $expires); my $envelopeObject = $envelopeRecord->toObject; my $envelopeHash = $envelopeObject->calculateHash;
Creates a message envelope embedding the message record. The message record should not be larger than 1 KiB. Additional data must be stored on the messaging store. The envelope is signed with the key pair's private key, and the AES key is encrypted for each recipient. The expiration date indicates when the message expires.
Private box envelopes
ArrayList<PublicKey> recipientPublicKeys = new ArrayList<>(); recipientPublicKeys.add(publicKey1); recipientPublicKeys.add(publicKey2); ... Record envelopeRecord = keyPair.createPrivateEnvelope(contentReference, recipientPublicKeys); CondensationObject envelopeObject = envelopeRecord.toObject(); Hash envelopeHash = envelopeObject.calculateHash();
var recipientPublicKeys = [publicKey1, publicKey2, ...]; var envelopeRecord = keyPair.createPrivateEnvelope(contentReference, recipientPublicKeys); var envelopeObject = envelopeRecord.toObject(); var envelopeHash = envelopeObject.calculateHash();
my $recipientPublicKeys = [$publicKey1, $publicKey2, ...]; my $envelopeRecord = $keyPair->createPrivateEnvelope($contentReference, $recipientPublicKeys); my $envelopeObject = $envelopeRecord->toObject; my $envelopeHash = $envelopeObject->calculateHash;
Creates a private envelope pointing to the given content reference. The envelope is signed with the key pair's private key, and the AES key is encrypted for each recipient.
Public box envelopes
Record envelopeRecord = keyPair.createPublicEnvelope(contentHash); CondensationObject envelopeObject = envelopeRecord.toObject(); Hash envelopeHash = envelopeObject.calculateHash();
var envelopeRecord = keyPair.createPublicEnvelope(contentHash); var envelopeObject = envelopeRecord.toObject(); var envelopeHash = envelopeObject.calculateHash();
my $envelopeRecord = $keyPair->createPublicEnvelope($contentHash); my $envelopeObject = $envelopeRecord->toObject; my $envelopeHash = $envelopeObject->calculateHash;
Creates a public envelope pointing to the given content hash. The envelope is signed with the key pair's private key.