Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 764672009FB for ; Fri, 6 May 2016 15:15:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 74F63160A0D; Fri, 6 May 2016 13:15:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB37B160A0C for ; Fri, 6 May 2016 15:15:13 +0200 (CEST) Received: (qmail 85646 invoked by uid 500); 6 May 2016 13:15:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 85579 invoked by uid 99); 6 May 2016 13:15:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2016 13:15:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E90982C1F62 for ; Fri, 6 May 2016 13:15:12 +0000 (UTC) Date: Fri, 6 May 2016 13:15:12 +0000 (UTC) From: "Xianda Ke (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CRYPTO-56) add informative error message, keep consistent with JDK MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 06 May 2016 13:15:14 -0000 [ https://issues.apache.org/jira/browse/CRYPTO-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15274011#comment-15274011 ] Xianda Ke commented on CRYPTO-56: --------------------------------- please help review. [GitHub PR|https://github.com/apache/commons-crypto/pull/41] > add informative error message, keep consistent with JDK > ------------------------------------------------------- > > Key: CRYPTO-56 > URL: https://issues.apache.org/jira/browse/CRYPTO-56 > Project: Commons Crypto > Issue Type: Improvement > Reporter: Xianda Ke > > 1. Invalid key length > When the key length is invalid, Commons Crypto's error message is > "Invalid key length." > JDK would throw an error message: "Invalid AES key length: xx bytes" > 2. invalid IV length error mesage > Commons Crypto : "Wrong IV length." > JDK: "Wrong IV length: must be 16 bytes long" > JDK's error message is more informative. it would be better to keep consistent with JDK. -- This message was sent by Atlassian JIRA (v6.3.4#6332)