Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crypto-md5

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypto-md5

Simply expose crypto md5 as a single function

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
190K
decreased by-4.34%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version

crypto-md5

There are several md5 modules on npm, but none of them use the crypto node module. Researching the performance impact of one vs another is tedious, and I just wanted to use the core one without having to duplicate code all the time so I just implemented this function as a separate module.

Usage

npm install --save crypto-md5

API

md5(data, digest)

Returns a base64 md5 hash of the buffer or string. Can return an hex digest.

  • data: buffer or string to hash
  • digest: optional digest type. Can be base64 (default) or hex
var md5 = require('md5');

md5('foobar');

// OFj2IjCsPJFfMAxmQxLGPw==

md5('foobar', 'hex');

// 3858f62230ac3c915f300c664312c63f

Contributions

Please open issues for bugs and suggestions in github. Pull requests with tests are welcome.

Author

Jerome Touffe-Blin, @jtblin, About me

License

crypto-md5 is copyright 2015 Jerome Touffe-Blin and contributors. It is licensed under the BSD license. See the include LICENSE file for details.

Keywords

FAQs

Package last updated on 04 Apr 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