With 1. the array keyBytes is the precomputed PKCS#12 key that the password, salt, and iteration count in the second half of the example produce.
With 2. it's to demonstrate what PKCS#12 PBE does under the covers - it takes the password, salt and iteration count and an internal key which is the same value as keyBytes.
Regards,
David
|