Socket
Socket
Sign inDemoInstall

sri-toolbox

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sri-toolbox

Subresource Integrity tools


Version published
Weekly downloads
95K
decreased by-1.19%
Maintainers
1
Weekly downloads
 
Created
Source

sri-toolbox Build Status

Subresource Integrity tools.

Install

npm install sri-toolbox

Usage

var sriToolbox = require("sri-toolbox");

var jquerySourceCode = file("jquery-1.10.2.min.js");

var integrity = sriToolbox.generate({
    type: "application/javascript",
    algorithms: ["sha256"],
}, jquerySourceCode);
//=> "type:application/javascript sha256-C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg="

API

generate

Generate creates a Sub-resource Integrity attribute from a data string.

Options

Key: type name = default

  • array algorithms = ["sha256"]
    List of hashing algorithms

  • string delimiter = " "
    Integrity attribute delimiter

  • string type = ""
    Content-type of file

Keywords

FAQs

Package last updated on 25 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc