-
Notifications
You must be signed in to change notification settings - Fork 3
About
Hashblot is a simple site / tool / library / function / method for hash visualization, created by Stuart P. Bentley.
Hashblot runs any given string of characters through a hash function to produce a unique image based on the splines of its corresponding hash value.
- Generating abstract art from random phrases (if you like doing this, you may also like http://www.random-art.org/)
- Mashing the keyboard to generate random designs for inspiration
- Using your email address + the domain of a site to come up with a "correct horse battery staple"-style password
- A site for storing reminders for passwords conceived using this method is being developed at blot.pw.
hashblot is available as an NPM module (no bower yet, sorry):
npm install --save hashblot
The function hashblot.qp
takes in any hexadecimal string with a length divisible by 8 and converts it to a series of SVG path instructions to draw quadratic Bézier curves (basically, just a 'Q' + decimal values for every 4 bytes, plus the last two at the beginning preceded with 'M' so the path closes correctly). The hashblot.sha1qp
function takes a string, and returns the hashblot.qp
output of the SHA-1 hash (to use it in the browser, you'll need to include jsSHA first). To draw this, create an <svg>
element containing a <path>
, then assign the return value to the 'd'
attribute.