8209129: Further improvements to cipher buffer management

Reviewed-by: weijun, igerasim
This commit is contained in:
Sean Coffey 2018-08-23 11:37:14 +01:00
parent 58e2f2d41c
commit 50ec35819d
15 changed files with 388 additions and 316 deletions

View file

@ -73,7 +73,7 @@ final class PBEKey implements SecretKey {
this.key = new byte[passwd.length];
for (int i=0; i<passwd.length; i++)
this.key[i] = (byte) (passwd[i] & 0x7f);
Arrays.fill(passwd, ' ');
Arrays.fill(passwd, '\0');
type = keytype;
// Use the cleaner to zero the key when no longer referenced