public static PrivateKey load()

in jsign-core/src/main/java/net/jsign/PrivateKeyUtils.java [60:72]


    public static PrivateKey load(File file, String password) throws KeyException {
        try {
            if (file.getName().endsWith(".pvk")) {
                return PVK.parse(file, password);
            } else if (file.getName().endsWith(".pem")) {
                return readPrivateKeyPEM(file, password);
            }
        } catch (Exception e) {
            throw new KeyException("Failed to load the private key from " + file, e);
        }
        
        throw new IllegalArgumentException("Unsupported private key format (PEM or PVK file expected");
    }