On Tue, 2 Jun 2026 19:35:00 GMT, Matthew Donovan <[email protected]> wrote:

> This short PR updates PBEKeyTest to correctly exercise passwords with 
> non-ASCII characters. JDK-8348732 removed the requirement that passwords only 
> contain ASCII characters. 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEKeyTest.java line 45:

> 43: 
> 44:         pass = new char[] { 'p', 'a', 's', 's', 'w', 'o', 'r', '\u0019' };
> 45:         testPassword(pass, fac, "non-ASCII password");

Maybe a bit misleading because U+0019 is actually an ASCII char? (though a 
non-visible / control character)

Would it make sense to therefore change the test `desc` for this?
And what about also testing 'real' non-ASCII characters (in case they are 
supported), such as chars with code point >= 128, 256 and maybe even > 65535?

(This is only a suggestion, I am not an OpenJDK member.)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31353#discussion_r3362384944

Reply via email to