Code example for NoSuchPaddingException

0
 
    protected void engineSetPadding( 
        String  padding)
    throws NoSuchPaddingException 
    { 
        throw new NoSuchPaddingException("Padding " + padding + " unknown.");
    } 
 
    protected void engineInit( 
        int                     opmode,
        Key                     key,
        AlgorithmParameterSpec  params,
        SecureRandom            random)
    throws InvalidKeyException, InvalidAlgorithmParameterException 
    { 
        CipherParameters        param;
 
        if (key instanceof BCPBEKey)
        { 
            BCPBEKey k = (BCPBEKey)key;