Code example for BadPaddingException

Methods: getMessage

0
        } catch (Base64DecoderException e) {
            throw new ValidationException(e.getMessage() + ":" + obfuscated);
        } catch (IllegalBlockSizeException e) {
            throw new ValidationException(e.getMessage() + ":" + obfuscated);
        } catch (BadPaddingException e) {
            throw new ValidationException(e.getMessage() + ":" + obfuscated);
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException("Invalid environment", e);
        } 
    } 
     
    public class ValidationException extends Exception {
        public ValidationException() { 
          super(); 
        } 
 
        public ValidationException(String s) {
          super(s);
        } 
 
        private static final long serialVersionUID = 1L;