We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can we use HmacSHA256 for signedURI?


I am using REST api to create and download word document in Salesforce . For generating signedURI I am using “HmacSHA1”. Now I wanted to use “HmacSHA256” instead of “HmacSHA1”.
I tried as follows,
Blob mac = Crypto.generateMac(‘HmacSHA256’, Blob.valueOf(url.toExternalForm()), Blob.valueOf(asposeAppKey));

It’s giving me an error as,

System.HttpResponse[Status=Forbidden, StatusCode=403]
Is aspose support “HmacSHA256” ?? can you help me on this ??

Thank you

Hi Sonal,

This is a common algorithm and all customers are using it. If it will be changed, all customers will be affected by this change so it is not possible to use HmacSHA256 right now.

Can you please share why it is not possible for you to use HmacSHA1 and you want to use HmacSHA256 in any case?

Best Regards,

Thank you for response. Actually we are planning to go for PCI DSS standards and for it HmacSHA256 is mandatory . So can we use HmacSHA256 while creating SignedURI??

Thank you.

Hi Sonal,

At the moment, it is not supported however we will check the possibility of implementing this feature and let you know.

Best Regards,