function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shweta TyagiShweta Tyagi 

How to generate 0auth signature for netsuite in apex class.

I am using Following Code: generateSignature(algorithmName, input, consumersecret,tokensecret);
public static String generateSignature(String algorithmName, String input, String consumerSecret, String tokenSecret) {
        Blob sig = Crypto.generateMac(algorithmName, Blob.valueOf(input), Blob.valueOf(consumerSecret + '&' + tokenSecret));
        String signature = EncodingUtil.base64encode(sig);
        System.debug('##### signature: ' + signature);
        return signature;
    }

But from this, I got the error when signature contains '+' plus operator. Please help to find the solution.
NagendraNagendra (Salesforce Developers) 
Hi Shweta,

Sorry for this issue you are encountering.

May I suggest you please refer to below links with a similar discussion which might help you further with the above issue. Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra