{"id":21460256,"url":"https://github.com/computnik/gulp-sha","last_synced_at":"2025-03-17T04:35:39.807Z","repository":{"id":49285829,"uuid":"73044583","full_name":"computnik/gulp-sha","owner":"computnik","description":"Library to handle SHA with gulp","archived":false,"fork":false,"pushed_at":"2023-04-17T16:09:44.000Z","size":367,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T10:51:47.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/computnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-07T05:16:45.000Z","updated_at":"2021-06-20T08:10:32.000Z","dependencies_parsed_at":"2023-01-23T15:01:37.786Z","dependency_job_id":null,"html_url":"https://github.com/computnik/gulp-sha","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computnik%2Fgulp-sha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computnik%2Fgulp-sha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computnik%2Fgulp-sha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computnik%2Fgulp-sha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/computnik","download_url":"https://codeload.github.com/computnik/gulp-sha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976038,"owners_count":20377691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T06:38:55.566Z","updated_at":"2025-03-17T04:35:39.783Z","avatar_url":"https://github.com/computnik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-sha [![NPM version][npm-image]][npm-url] [![node][node-image]][npm-url] \nLibrary to handle SHA with gulp\n\n\u003e [Gulp](http://gulpjs.com) plugin for hashing using popular SHA algorithms.\n\n## Information\n| Package                | **gulp-sha**                                                        |\n| ---------------------- | ------------------------------------------------------------------- |\n| Version                | [v0.2.1](https://github.com/computnik/gulp-sha/releases/tag/v0.2.1) |\n| Node Version Supported | \u003e= 0.10.0                                                           |\n| Gulp Version Supported | 4.x                                                                 |\n| Author                 | [@computnik](https://github.com/computnik)                          |\n\n## Usage\n\n### Install\n\n```\nnpm install gulp-sha --save-dev\n```\n\nThen, add it into your `gulpfile.js`:\n\n## Examples\n\n#### Input\n\nThe following is in the inputfile\n\n```\nThis is a dummy File\n```\n\n#### GulpFile\n\n```javascript\nvar gulp = require(\"gulp\");\nvar gulpSHA = require(\"gulp-sha\");\nvar inputFile=\"./inputFile\"; // Path to input File\nvar outputDir=\"./\"; // Path to Output directory\nvar options = {\n  hashType: \"SHA-256\",\n  numRounds: 2,\n  useHmac: true,\n  hmacKey: \"abc\"\n};\ngulp.src(inputFile)\n  .pipe(gulpSHA(options))\n  .pipe(gulp.dest(outputDir));\n```\n\n\n#### Output Generated\n\n```\nc7716ed373d76c4a1a4f8c1b622c6955838cab6fd2260824845dc599bd03a5b0\n```\n\n## API\n\n### gulp-sha(options)\n\n#### options.hashType\nType: `String`\nDefault: `SHA-256`\nValid Options: `SHA-1`, `SHA-224`, `SHA3-224`, `SHA-256`, `SHA3-256`, `SHA-384`, `SHA3-384`, `SHA-512`, `SHA3-512`, `SHAKE128` or `SHAKE256`\nType of Hashing Algorithm. This **should** be any one of the available values\n\n#### options.encoding\nType: `String`\nDefault: `UTF8`\nValid Options: `UTF8`, `UTF16BE` or `UTF16LE`\nType of Encoding. It specifies the encoding used to encode TEXT-type inputs\n\n#### options.inputType\nType: `String`\nDefault: `TEXT`\nValid Options: `HEX`, `TEXT`, `B64`, `BYTES`, or `ARRAYBUFFER`\nThis is type of input provided. It can take any of the possible values above.\n\n#### options.outputType\nType: `String`\nDefault: `HEX`\nValid Options: `HEX`, `TEXT`, `B64`, `BYTES`, or `ARRAYBUFFER`\nSimilar to `inputType`, specifies the format of output generated\n\n#### options.numRounds\nType: `Integer`\nDefault: `1`\nNumber of rounds for hashing.\n\n#### options.useHmac\nType: `Boolean`\nDefault: `false`\nValid Options: `true` or `false`\nFlag to enable [HMAC][HMAC-info-url] aka Hash-based Message Authentication Code.\n\n#### options.HMACKey\nType: `String`\nDefault: `\"\"`\n[HMAC][HMAC-info-url] Key. This needs to be set along with `useHmac` flag, to set a [HMAC][HMAC-info-url] key. \n\n#### options.HMACType\nType: `String`\nDefault: `TEXT`\nValid Options: `HEX`, `TEXT`, `B64`, `BYTES`, or `ARRAYBUFFER`\nType of [HMAC][HMAC-info-url] Key, similar to `inputType`.\n\n#### options.outputUpper\nType: `Boolean`\nDefault: `false`\nThis option is intelligently interpreted based upon the chosen output format, by [jssha](https://github.com/Caligatio/jsSHA) library.\n\n#### options.b64Pad\nType: `String`\nDefault: `=`\nThis option is intelligently interpreted based upon the chosen output format, by [jssha](https://github.com/Caligatio/jsSHA) library.\n\n\n#### options.shakeLen\nType: `Integer`\nDefault: `0`\nThis option is required for `SHAKE` type of hashing algorithms.\n**Important**: \nSHAKE128 and SHAKE256 require `shakeLen` to be included in the hashmap where`shakeLen` is the desired output length of the SHAKE algorithm in a multiple of 8 bits.\n\n#### Additional Info\n\n`gulp-sha` uses [jssha](https://github.com/Caligatio/jsSHA). More information about Algorithms can be found there.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n\n[npm-url]: https://www.npmjs.com/package/gulp-sha\n[npm-image]: https://img.shields.io/npm/v/gulp-sha.svg\n[node-image]: https://img.shields.io/node/v/gulp-sha.svg\n\n[github-url]:https://github.com/motnik/gulp-sha\n[github-tag-image]: https://img.shields.io/github/tag/motnik/gulp-sha.svg\n\n[HMAC-info-url]:https://en.wikipedia.org/wiki/Hash-based_message_authentication_code","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputnik%2Fgulp-sha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomputnik%2Fgulp-sha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputnik%2Fgulp-sha/lists"}