use of org.pentaho.support.encryption.PasswordEncoderException in project pentaho-kettle by pentaho.
the class Encr method init.
public static void init(String encoderPluginId) throws KettleException {
if (Utils.isEmpty(encoderPluginId)) {
throw new KettleException("Unable to initialize the two way password encoder: No encoder plugin type specified.");
}
PluginRegistry registry = PluginRegistry.getInstance();
PluginInterface plugin = registry.findPluginWithId(TwoWayPasswordEncoderPluginType.class, encoderPluginId);
if (plugin == null) {
throw new KettleException("Unable to find plugin with ID '" + encoderPluginId + "'. If this is a test, make sure" + " kettle-core tests jar is a dependency. If this is live make sure a kettle-password-encoder-plugins.xml" + " exits in the classpath");
}
encoder = (TwoWayPasswordEncoderInterface) registry.loadClass(plugin);
//
try {
encoder.init();
} catch (PasswordEncoderException e) {
throw new KettleException(e);
}
}
Aggregations