In PBES1Core.deriveCipherKey() there are loops that look like following:
for (int i = 0; i < iCount; i++) {
md.update(toBeHashed);
toBeHashed = md.digest(); // this resets the digest
}
Calling md.digest() each time allocates a new byte[] array.
It would be more GC friendly, if the same array were reused.
|