Hi Peter,
many thanks for your support. The function is not crashing anymore!
However there are still some problems. It seems to me the function "checkPassword" returns always "false". For clear test I am generating a key and checking password directly after generating, with using same password.
Here is code snippet:
try {
// invoke the key pair generation
KeyPairInformation key =
keyStore.generateKeyPair(keySizeInBits,
userId,
algorithm,
privateKeyPassword,
compressions,
hashingAlgorithms,
cyphers);
System.err.println("1; Generation:" +
"keystore password: "+keyStore.getKeystorePassword());
System.err.println("2; Generation:" +
"check password: "+keyStore.checkPassword(keystoreFile.getAbsolutePath(), privateKeyPassword));
System.err.println("3; Generation:" +
"check password: "+keyStore.checkPassword(keyStore.getKeystoreFileName(), privateKeyPassword));
and logs:
05-26 15:06:54.325: W/System.err(9893): 1; Generation:keystore password: null
05-26 15:06:54.326: W/System.err(9893): 2; Generation:check password: false
The third tracing do not appears in the logs, instead I am getting a Toast message with this text: "Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference. This toast message also apparently within the function's internal realization, so its not really clear to me and not clear what happens there.
Could you kindly take attention on this part too?