natemcmaster - srihash-cli 0.1.0-build.1
A command line tool for generating the SRI hash for browsers
PM> Install-Package srihash-cli -Version 0.1.0-build.1 -Source https://www.myget.org/F/natemcmaster/api/v3/index.json
> nuget.exe install srihash-cli -Version 0.1.0-build.1 -Source https://www.myget.org/F/natemcmaster/api/v3/index.json
> dotnet add package srihash-cli --version 0.1.0-build.1 --source https://www.myget.org/F/natemcmaster/api/v3/index.json
source https://www.myget.org/F/natemcmaster/api/v3/index.json
nuget srihash-cli ~> 0.1.0-build.1
Copy to clipboard
> choco install srihash-cli --version 0.1.0-build.1 --source https://www.myget.org/F/natemcmaster/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "natemcmaster" -SourceLocation "https://www.myget.org/F/natemcmaster/api/v2"
Install-Module -Name "srihash-cli" -RequiredVersion "0.1.0-build.1" -Repository "natemcmaster" -AllowPreRelease
Copy to clipboard
srihash-cli
A command-line utility for generating the hash used for subresource integrity (SRI) checks in modern browsers.
Example:
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
crossorigin="anonymous">
</script>
Get started
Install:
$ dotnet tool install -g srihash-cli
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: 2.1.0.0
OwnersNate McMaster |
AuthorsNate McMaster |
Project URLhttps://github.com/natemcmaster/srihash-cli |
LicenseApache-2.0 |
Tagssri cli sri hash subresource integrity |
Info16 total downloads |
| 5 downloads for version 0.1.0-build.1 |
| Download (76.81 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
0.1.11 | 68.69 KB | Sat, 17 Aug 2019 21:07:39 GMT | 1 |
|
||
|
|
0.1.10 | 68.7 KB | Sat, 17 Aug 2019 05:12:33 GMT | 4 |
|
||
|
|
0.1.1 | 76.8 KB | Wed, 16 May 2018 21:09:05 GMT | 2 |
|
||
|
|
0.1.1-build.5 | 76.81 KB | Thu, 17 May 2018 15:29:58 GMT | 1 |
|
||
|
|
0.1.1-build.3 | 76.81 KB | Wed, 16 May 2018 20:51:47 GMT | 1 |
|
||
|
|
0.1.0 | 76.81 KB | Tue, 15 May 2018 23:42:49 GMT | 2 |
|
||
|
|
0.1.0-build.1 | 76.81 KB | Tue, 15 May 2018 23:27:50 GMT | 5 |
|