As per all readings I have found that, while using USB Token(HSM) we are unable to fetch private key from USB Token, Then Why we call KeyStore.getKey(alias,password)
in java code.
I have done something like this where ks is my KeyStore object.
PrivateKey privateKey=(PrivateKey)ks.getKey(alias,pass.toCharArray());
and then print privateKey i get the following values.
{algorithm: "RSA", encoded: null, format: null}
Can anybody explain the need of This step, and what it will do while we digitally sign a document using USB Token?