class EncryptedMessageMaker
Defined at line 32 of file ../../third_party/cobalt/src/lib/util/encrypted_message_util.h
EncryptedMessageMaker is used by the Encoder to encrypt protocol buffer
messages before sending them to the Shuffler (and then to the Analyzer).
The Encoder should make two instances of this class:
one constructed with the public key of the Analyzer used for encrypting
Observations and one with the public key of the Shuffler used for
encrypting Envelopes.
Public Methods
bool Encrypt (const google::protobuf::MessageLite & message, EncryptedMessage * encrypted_message)
Encrypts a protocol buffer |message| and populates |encrypted_message|
with the result. Returns true for success or false on failure.
util::NotNullUniquePtr<EncryptedMessageMaker> MakeUnencrypted ()
Make an UnencryptedMessageMaker.
Message will be serialized, but not encrypted: they will be sent in plain
text. This scheme must never be used in production Cobalt.
lib::statusor::StatusOr<util::NotNullUniquePtr<EncryptedMessageMaker>> MakeForEnvelopes (const std::string & cobalt_encryption_key_bytes)
Make an EncryptedMessageMaker to encrypt Envelopes.
Messages will be encrypted using the scheme corresponding to the key
that is passed in. |cobalt_encryption_key_bytes| is a serialized
cobalt::CobaltEncryptionKey protobuf message.
lib::statusor::StatusOr<util::NotNullUniquePtr<EncryptedMessageMaker>> MakeForObservations (const std::string & cobalt_encryption_key_bytes)
Make an EncryptedMessageMaker to encrypt Observations.
Messages will be encrypted using the scheme corresponding to the key
that is passed in. |cobalt_encryption_key_bytes| is a serialized
cobalt::CobaltEncryptionKey protobuf message.
void ~EncryptedMessageMaker ()
Defined at line 58 of file ../../third_party/cobalt/src/lib/util/encrypted_message_util.h