@ SneakyThrows public static PrivateKey extractPrivateKeyFromResource ( final String signingSecretKey ) { 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 ( ) ; }
Extract private key from resource private key .