subresource-integrity
v1.0.0
Published
Subresource integrity hashes generator
Downloads
30
Readme
subresource-integrity
Subresource integrity hashes generator.
Installation
The easiest way to get the package is to install it through npm
$ npm install --save subresource-integrity
Usage
const hash = sri('<data-to-encode>', ['sha384', 'sha512'])
API
sri(data, algorithms) => string
Returns generated SRI hash(es).
data
Type: string
Data to encode
algorithms
Type: string|Array<string>
SHA algorithms to encode with
License
Copyright 2016 Romain Vanesyan.
The subresource-integrity
is primary distributed under the terms of the MIT license.