srihash-cli 0.1.1

A command line tool for generating the SRI hash for browsers

dotnet tool install --global srihash-cli --version 0.1.1
This package contains a .NET Core Global Tool you can call from the shell/command line.

A command-line utility for generating the hash used for subresource integrity (SRI) checks in modern browsers.

Generate the hash:

$ srihash https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js
sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds

Generate the full HTML tag:

$ srihash --html https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>

A command-line utility for generating the hash used for subresource integrity (SRI) checks in modern browsers.

Generate the hash:

$ srihash https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js
sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds

Generate the full HTML tag:

$ srihash --html https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>

  • .NETCoreApp 2.1

    • No dependencies.

Version History

Version Downloads Last updated
0.1.1 95 5/16/2018
0.1.0 83 5/15/2018