ProtectionParameter protectionParam = new KeyStore.PasswordProtection(keyPassword);System.out.println(protectionParam);
SecretKeyEntry secretKeyEnt = null;
SecretKey secretKey = null;
try {
secretKeyEnt = (SecretKeyEntry) keyStore.getEntry(SECRETKEYALIAS, protectionParam);
System.out.println(secretKeyEnt);
secretKey = ((SecretKeyEntry) secretKeyEnt).getSecretKey();
}
catch (NoSuchAlgorithmException | UnrecoverableEntryException | KeyStoreException e) {
LOGGER.error("error in getting the secret key|" + e);