if (provider == null) {
throw new IllegalArgumentException(Messages.getString("crypto.04")); //$NON-NLS-1$
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
throw new NoSuchProviderException(provider);
}
if (algorithm == null) {
throw new NullPointerException(Messages.getString("crypto.02")); //$NON-NLS-1$
}
return getInstance(algorithm, impProvider);