public static RSAPrivateKey loadPrivateKeyByBinary(byte[] privateKeyByte)
            throws Exception {
        try {
            // byte[] buffer = Base64.decodeBase64(privateKeyStr);
            PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyByte);
            KeyFactory keyFactory = KeyFactory.getInstance("RSA");
            return (RSAPrivateKey) keyFactory.generatePrivate(keySpec);
        } catch (NoSuchAlgorithmException e) {
            throw new Exception("no such algorithm");
        } catch (InvalidKeySpecException e) {
            throw new Exception("key error");
        } catch (NullPointerException e) {
            throw new Exception("npe error");
        }
    }
load private key by text

@param privateKeyStr private key

@throws Exception exception
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/utils/EncryptUtil.java