public static PrivateKey extractPrivateKeyFromResource(final String signingSecretKey) {
        return FunctionUtils.doAndThrowUnchecked(() -> {
            LOGGER.debug("Attempting to extract private key...");
            val resource = ResourceUtils.getResourceFrom(signingSecretKey);
            val factory = new PrivateKeyFactoryBean();
            factory.setAlgorithm(RsaKeyUtil.RSA);
            factory.setLocation(resource);
            factory.setSingleton(false);
            return factory.getObject();
        }, e -> new IllegalArgumentException("Unable to extract private key from location %s".formatted(signingSecretKey)));
    }
Extract private key from resource private key.

@param signingSecretKey the signing secret key
@return the private key
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/cipher/AbstractCipherExecutor.java