Java tutorial
//package com.java2s; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; public class Main { static Provider getProvider(String provider) throws NoSuchProviderException { Provider prov = Security.getProvider(provider); if (prov == null) { throw new NoSuchProviderException("Provider " + provider + " not found"); } return prov; } }