Merge change 4329 into donut

* changes:
  Change the first parameter of Keystore.generateKeyPair() to int.