func encryptIndexKey(doc *models.Document, password string) { key := utils.EncryptDataArmored([]byte(doc.KeyUnencrypted), password) doc.KeyEncrypted = string(key) }