presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/credential/keystore/KeyStoreUtils.java/KeyStoreUtils/readEntity
class KeyStoreUtils:    public static String readEntity(KeyStore keyStore, String entityAlias, String entityPassword)
            throws UnrecoverableEntryException, NoSuchAlgorithmException, KeyStoreException, InvalidKeySpecException
    {
        SecretKeyEntry secretKeyEntry = (SecretKeyEntry) keyStore.getEntry(entityAlias, new PasswordProtection(entityPassword.toCharArray()));

        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBE");
        PBEKeySpec keySpec = (PBEKeySpec) factory.getKeySpec(secretKeyEntry.getSecretKey(), PBEKeySpec.class);

        return new String(keySpec.getPassword());
    }