Lines Matching refs:encrypted
45 sync_pb::EncryptedData* encrypted) const {
46 DCHECK(encrypted);
55 encrypted->set_key_name(default_nigori_->first);
57 encrypted->mutable_blob())) {
64 bool Cryptographer::Decrypt(const sync_pb::EncryptedData& encrypted,
67 std::string plaintext = DecryptToString(encrypted);
72 const sync_pb::EncryptedData& encrypted) const {
73 NigoriMap::const_iterator it = nigoris_.find(encrypted.key_name());
80 if (!it->second->Decrypt(encrypted.blob(), &plaintext)) {
87 bool Cryptographer::GetKeys(sync_pb::EncryptedData* encrypted) const {
88 DCHECK(encrypted);
104 return Encrypt(bag, encrypted);
133 bool Cryptographer::SetKeys(const sync_pb::EncryptedData& encrypted) {
134 DCHECK(CanDecrypt(encrypted));
137 if (!Decrypt(encrypted, &bag)) {
140 InstallKeys(encrypted.key_name(), bag);
144 void Cryptographer::SetPendingKeys(const sync_pb::EncryptedData& encrypted) {
145 DCHECK(!CanDecrypt(encrypted));
146 pending_keys_.reset(new sync_pb::EncryptedData(encrypted));