JSPM

gulp-sha

0.0.2-0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q53265F
  • License MIT

Plugin to handle SHA with gulp

Package Exports

  • gulp-sha

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-sha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gulp-sha

Library to handle SHA with gulp

NPM version node GitHub tag

A gulp plugin to gulpSHA a file contents.

Usage

Firstly, install gulp-sha as a development dependency:

npm install gulp-sha --save-dev

Then, add it into your gulpfile.js:

** Use gulp SHA-1 to encode file with SHA-1 Algorithm:**

example

input

The following is in the inputfile

This is a dummy File

gulpfile.js

var gulpSHA = require("gulp-sha");
var inputFile="./inputFile"; // Path to input File
var outputDir="./"; // Path to Output directory
var options = {
  hashType: "SHA-256",
  numRounds: 2,
  useHmac: true,
  hmacKey: "abc"
};
gulp.src(inputFile)
  .pipe(gulpSHA(options))
  .pipe(gulp.dest(outputDir));

output

c7716ed373d76c4a1a4f8c1b622c6955838cab6fd2260824845dc599bd03a5b0

Parameters

License

MIT License