Code example for ExemptionMechanismException

0
            ExemptionMechanismException { 
        if (key == null) { 
            throw new InvalidKeyException("key is null"); 
        } 
        if (!(key instanceof tmpKey)) { 
            throw new ExemptionMechanismException("Incorrect key"); 
        } 
    } 
 
    @Override 
    protected void engineInit(Key key, AlgorithmParameters params) 
            throws InvalidKeyException, InvalidAlgorithmParameterException, 
            ExemptionMechanismException { 
        if (key == null) { 
            throw new InvalidKeyException("key is null");             
        } 
        if (!(key instanceof tmpKey)) { 
            throw new ExemptionMechanismException("Incorrect key"); 
        } 
        if (params == null) { 
Connect your IDE to all the code out there  Get Codota for Java