Unable to use java.security.spec.X509EncodedKeySpec

I need to encrypt a message to be sent to a cloud service by using a public key provided by the same service. This a the code snippet in question:

        // Create public key from string
        def publicKeyContent = "..."
        def kf = java.security.KeyFactory.getInstance("RSA");
        def keySpecX509 = new java.security.spec.X509EncodedKeySpec(java.util.Base64.getDecoder().decode(publicKeyContent))
        def pubKey = kf.generatePublic(keySpecX509);        
        // Encrypt the message
        def message = "Hello, World!"
        def cipher = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding")
        cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, pubKey);
        def encryptedBytes = cipher.doFinal(message);

Unfortunately Hubitat doesn't allow "java.security.spec.X509EncodedKeySpec" to be imported... Not sure why that is the case; are there alternatives I can use?

OK - I guess no alternatives.
Any chance X509EncodedKeySpec could get whitelisted then?

@bobbyD - any chance this can be raised as a "formal" enhancement request? I can't see any downside at whitelisting the X509EncodedKeySpec class, and it is indeed something which is needed when interacting with some cloud services.
If the answer is negative, please let me know as well - as I will have to create a cumbersome solution based on a little webservice hosted externally to hubitat... But at least I will know that's the only way to achieve what I need.
Thanks!