else {
ArrayList<TransformerTO> transformerTOs = new ArrayList<TransformerTO>(repoTO.getTransformers());
Transformer lastTransformer = null;
for (int i = transformerTOs.size() - 1; i >= 0; i--) {
TransformerTO transformerTO = transformerTOs.get(i);
Transformer transformer = Transformer.getInstance(transformerTO.getType());
if (transformer == null) {
throw new ConfigException("Cannot find transformer '" + transformerTO.getType() + "'");
}
if (transformer instanceof CipherTransformer) { // Dirty workaround
transformerTO.getSettings().put(CipherTransformer.PROPERTY_MASTER_KEY, StringUtil.toHex(getMasterKey().getEncoded()));
transformerTO.getSettings().put(CipherTransformer.PROPERTY_MASTER_KEY_SALT, StringUtil.toHex(getMasterKey().getSalt()));
}
transformer.init(transformerTO.getSettings());
if (lastTransformer != null) {
transformer.setNextTransformer(lastTransformer);
}