Socket
Socket
Sign inDemoInstall

pretty-hash

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pretty-hash

Output binary buffers as a nice shortened hex string


Version published
Weekly downloads
838
decreased by-23.96%
Maintainers
1
Install size
1.91 kB
Created
Weekly downloads
 

Readme

Source

pretty-hash

Output binary buffers as a nice shortened hex string

var prettyHash = require('pretty-hash')
var crypto = require('crypto')

prettyHash(crypto.randomBytes(32)) // => '0b0a97..f3'
prettyHash(crypto.randomBytes(16)) // => '0b0395..8a'
prettyHash(crypto.randomBytes(4)) // => '49ab09ed'
prettyHash(crypto.randomBytes(1)) // => 'f8'
prettyHash('not a hash') // => 'not a hash'

Keywords

FAQs

Last updated on 22 Nov 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc