protected <T> void encrypt (T entity, ClassDescriptor<?> desc, IEncryptionProvider provider) {
for (ClassProperty property : desc.getProperties(Encrypted.class)) {
this.encrypt(entity, provider, property);
}
EncryptedFields fields = desc.getAnnotation(EncryptedFields.class);
if (fields != null) {
for (String name : fields.value()) {
this.encrypt(entity, provider, desc.getProperty(name));
}
}
}