rzcoder / node-rsa

Node.js RSA library
1.39k stars 205 forks source link

Cannot find signing scheme equivalent of "NONEwithRSA" in JAVA. #209

Open swarupkm opened 2 years ago

swarupkm commented 2 years ago

Java security module has the below Signature algorithm support.

        String hash = "797c61b0a08a85da84ef59499fd26c3a44db9a718ba255423acae4407dc2948b";

        Signature sig = Signature.getInstance("NONEwithRSA");
        PrivateKey privateKey = getPrivateKey();
        sig.initSign(privateKey);
        sig.update(hash.getBytes());
        byte[] signedData = sig.sign();
        System.out.println(Base64.getEncoder().encodeToString(signedData));

Is there a way in Javascript to do its equivalent?

rkamaldev commented 2 years ago

Hi @swarupkm , Did you manage to find a fix or alternative to support for NONEwithRSA algorithm on Nodejs? Seems there is no an equivalent algorithm for NONEwithRSA in Nodejs