} catch (KeyczarException e) {
throw new IllegalStateException("Error encrypting secret", e);
}
item.setCiphertext(ByteString.copyFrom(ciphertext));
Project project = secretImpl.getProject();
secretData = repository.getSecrets(project).update(b);
return new SecretImpl(project, secretData, crypter);
}