Code example for BadPaddingException

Methods: getMessage

0
                return wrapEngine.wrap(encoded, 0, encoded.length);
            } 
        } 
        catch (BadPaddingException e)
        { 
            throw new IllegalBlockSizeException(e.getMessage());
        } 
    } 
 
    protected Key engineUnwrap(
        byte[]  wrappedKey,
        String  wrappedKeyAlgorithm,
        int     wrappedKeyType)
    throws InvalidKeyException, NoSuchAlgorithmException 
    { 
        byte[] encoded;
        try 
        { 
            if (wrapEngine == null)
            { 
                encoded = engineDoFinal(wrappedKey, 0, wrappedKey.length);