New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@basekits/kit-node-hashing

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basekits/kit-node-hashing

Hash functions kit for basekits and node runtime.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@basekits/kit-node-hashing

Hash functions kit for basekits and node runtime.

Install

npm i @basekits/kit-node-hashing

Usage

const kit = require('@basekits/core')
const hashing = require('@basekits/kit-node-hashing')
kit.addKit(hashing)

Available Items

The following methods will be available after adding this kit:

.hash(data, algorithm = 'md5')

Returns hash of some data. data can be anything which node's crypto library accepts.

kit.hash('asdfghjklşi') // returns 'e1f301ea36789e07a445c6341bd88cbd'

.hashFile(filepath, algorithm = 'md5')

Returns hash of a file.

kit.hashFile('/path/to/somefile.txt') // returns 'e1f301ea36789e07a445c6341bd88cbd'

.hashcode(str)

Java's hashcode implementation in javascript. (Credits goes to: stackoverflow.com) Returns positive or negative number.

kit.hashcode('hello') // returns 99162322
kit.hashcode('lorem ipsum') // returns -2126368101

Keywords

FAQs

Package last updated on 09 Mar 2020

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