How to generate automatically SRI Hash in .net framework 4.7.2

217 Views Asked by At

In Security Scan, The third-party links/scripts don't have integrity attribute for the browser, so i want to generate SRI Hash in automatically for security purpose.

I need to Generate SRI Hash automatically in .net framework. But,i found for .net core like below but not for .net framework.

https://programmingcsharp.com/generate-sri-hash-for-client-libraries-asp-net/

Tried, Generated SRI hash in manually and used in HTML lik below, its working for me.

Generated SRI hash and updated in html

But I need to generate SRI Hash in automatically and used in html like above.

1

There are 1 best solutions below

0
Vincent On

My colleague recently asked for the same, and I found this https://github.com/halotron/AspNetMvcSubResourceIntegrityHelper from github for non .net core version. I hope this could help you and others.