code: @SneakyThrows
      public static PublicKey extractPublicKeyFromResource(final String secretKeyToUse) {
          LOGGER.debug("Attempting to extract public key from [{}]...", secretKeyToUse);
          val resource = ResourceUtils.getResourceFrom(secretKeyToUse);
          val factory = new PublicKeyFactoryBean();
          factory.setAlgorithm(RsaKeyUtil.RSA);
          factory.setResource(resource);
          factory.setSingleton(false);
          return factory.getObject();
      }
docs: Extract public key from resource public key.
  
  @param secretKeyToUse the secret key to use
  @return the public key