Skip to content

Output binary buffers as a nice shortened hex string

Notifications You must be signed in to change notification settings

pfrazee/pretty-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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'

About

Output binary buffers as a nice shortened hex string

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published