Code example for NoSuchPaddingException

0
 
    protected void engineSetPadding( 
        String  padding) 
        throws NoSuchPaddingException 
    { 
        throw new NoSuchPaddingException(padding + " unavailable with RSA.");
    } 
 
    protected void engineInit( 
        int                     opmode,
        Key                     key,
        AlgorithmParameterSpec  params,
        SecureRandom            random) 
    throws InvalidKeyException, InvalidAlgorithmParameterException 
    { 
        if (!(key instanceof IESKey))
        { 
            throw new InvalidKeyException("must be passed IE key");
        } 
 
        if (params == null && (opmode == Cipher.ENCRYPT_MODE || opmode == Cipher.WRAP_MODE))