Re: RFR: 8150530:Improve javax.crypto.BadPaddingException messages

2016-08-24 Thread Seán Coffey
Thanks for the review Xuelei. OK - I'll drop the 'password' reference then and push the changes. ! throw new BadPaddingException("Given final block not " + ! "properly padded. Such issues could arise if a bad key " + ! "is used

Re: RFR: 8150530:Improve javax.crypto.BadPaddingException messages

2016-08-24 Thread Xuelei Fan
On 8/24/2016 7:02 PM, Seán Coffey wrote: On 22/08/16 11:06, Xuelei Fan wrote: Minor comments: CipherCore.java --- "... could arise if a bad key or password is used during decryption." "password" may be confusing for some user cases. This could also happen if bad key used for

Re: RFR: 8150530:Improve javax.crypto.BadPaddingException messages

2016-08-24 Thread Seán Coffey
On 22/08/16 11:06, Xuelei Fan wrote: Minor comments: CipherCore.java --- "... could arise if a bad key or password is used during decryption." "password" may be confusing for some user cases. This could also happen if bad key used for encryption. I may just say "could arise if

Re: RFR: 8150530:Improve javax.crypto.BadPaddingException messages

2016-08-22 Thread Xuelei Fan
Minor comments: CipherCore.java --- "... could arise if a bad key or password is used during decryption." "password" may be confusing for some user cases. This could also happen if bad key used for encryption. I may just say "could arise if a bad key used." RSAPadding.java

RFR: 8150530:Improve javax.crypto.BadPaddingException messages

2016-08-22 Thread Seán Coffey
Looking to improve some of the messages used in generation of BadPaddingException messages. The 'Given final block not properly padded' one in particular has caused confusion for some users in the past. JBS report : https://bugs.openjdk.java.net/browse/JDK-8150530 webrev :