Code example for NoSuchAlgorithmException

0
    public void engineInit(KeyStore ks, char[] password) 
            throws KeyStoreException, NoSuchAlgorithmException, 
            UnrecoverableKeyException { 
         
        if (ks == null && password == null) { 
            throw new NoSuchAlgorithmException();             
        } 
         
        if (ks == null) { 
            throw new KeyStoreException(); 
        } 
         
        if (password == null) { 
            throw new UnrecoverableKeyException();             
        } 
         
        isInitialized = true; 
    } 
 
    public void engineInit(ManagerFactoryParameters spec) 
            throws InvalidAlgorithmParameterException {