keystore: Add paddings before checksumming.
keystore: Add paddings before checksumming.

Also fix a file descriptor leak when file system is nearly full.

Bug: 2339184

xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base