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