{"id":23814276,"url":"https://github.com/stuartpb/hashblot","last_synced_at":"2026-05-02T21:30:16.734Z","repository":{"id":8316386,"uuid":"9864839","full_name":"stuartpb/hashblot","owner":"stuartpb","description":"A simple method for abstract hash visualization","archived":false,"fork":false,"pushed_at":"2018-07-28T12:07:49.000Z","size":569,"stargazers_count":14,"open_issues_count":6,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-23T16:22:34.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hashblot.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuartpb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-05T06:11:56.000Z","updated_at":"2021-06-18T03:59:24.000Z","dependencies_parsed_at":"2022-07-19T18:05:06.451Z","dependency_job_id":null,"html_url":"https://github.com/stuartpb/hashblot","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fhashblot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fhashblot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fhashblot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fhashblot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuartpb","download_url":"https://codeload.github.com/stuartpb/hashblot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240079640,"owners_count":19744726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T03:47:03.716Z","updated_at":"2026-05-02T21:30:16.691Z","avatar_url":"https://github.com/stuartpb.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hashblot\n\nExpressive hash visualization - http://hashblot.com\n\n## What it is\n\nHashblot, at its most general level, is an algorithm for visualizing hash functions, by interpreting a sequence of bytes as a series of curves.\n\nThis repository contains a JavaScript library for converting byte sequences to paths, and an HTML file that takes that output for the SHA-1 hash of a string and displays the resulting image. See the \"Methods\" section for the exact functionality it provides.\n\n## Installation\n\nFor Node.js/browserify:\n\n    npm install --save hashblot\n\nFor Bower:\n\n    bower install hashblot\n\nhashblot.js will assign to `exports.module` if present, and `window.hashblot` if not, allowing it to be required as a Node/browserify module or included as a `\u003cscript\u003e` source.\n\n## Methods\n\n### hashblot.pd.q\n\nTakes an array of coordinates with a length divisible by 4 and converts it to an SVG Path Description string, like so:\n\n1. Prefix the entire string with 'M' + the last two numbers, denoting that the 'pen' should be moved to the last position in the shape before drawing the curves, so it will finish as a closed path where it started.\n2. Append \"Q\", followed by all the passed-in coordinates separated by commas, to denote a series of absolute-positioned quadratic Bézier curves, with each even pair of numbers as the X and Y coordinates of the control point, and each odd pair of numbers as the X and Y coordinates of the end point.\n\nThis function is meant to be used with an array of bytes returned from a hash function. For scenarios where you only have a hexadecimal string, you can use `hashblot.hexBytes` to convert a hexadecimal string to an array of bytes.\n\n### hashblot.path2d.q\n\nTakes an array of coordinates with a length divisible by 4 and an optional object implementing the [CanvasPathMethods][] `moveTo` and `quadraticCurveTo`.\n\n[CanvasPathMethods]: http://html5index.org/Canvas%20-%20CanvasPathMethods.html\n\nThis function applies `moveTo` and `quadraticCurveTo` operations for the given hash (as described in `hashblot.pd.q`) to the given object. If no object is given, this function will create a `new Path2D()` and return that.\n\n### hashblot.sha1qpd, hashblot.sha1qpath2d\n\nThese are versions of `hashblot.pd.q` and `hashblot.path2d.q` (respectively) that take a string, which is then converted to its SHA-1 hash and used with the corresponding function.\n\nWhen `module` is defined, this function will require and use the `crypto` module to produce the SHA-1 hash.\n\nOtherwise, it will use whatever \"sha1\" function is bound (see `hashblot.sha1` below).\n\n### hashblot.bindSha1\n\nThe SHA-1 function for `hashblot.sha1qpd` and `hashblot.sha1qpath2d` is bound to whatever value of `hashblot.sha1` is defined when one of these functions is first called.\n\nIt can be bound sooner by calling `hashblot.bindSha1`, with an optional argument containing the SHA-1 function to use.\n\nIn browser environments where there are multiple potential SHA-1 implementations available, you can use [any_sha1][] to automatically define the appropriate function to use:\n\n```\nhashblot.bindSha1(any_sha1.from(any_sha1.utf8.bytes));\n```\n\nYou can also copy the appropriate function for your specific library (as this module's index.html does, for [Rusha][]).\n\n[any_sha1]: https://github.com/stuartpb/any_sha1\n[Rusha]: https://github.com/srijs/rusha\n\n## Usage\n\nSee index.html for an example of using hashblot.js to generate an image.\n\nFor things you can use hashblot images to accomplish, see [the About page](https://github.com/stuartpb/hashblot/wiki/About).\n\n## License\n\nThe underlying methods of hashblot are released in the public domain.\n\nThe specific code of this implementation (hashblot.js and index.html) is\nreleased into the public domain under the terms of [the Unlicense][]:\n\n[The Unlicense]: http://unlicense.org/\n\n\u003e This is free and unencumbered software released into the public domain.\n\u003e\n\u003e Anyone is free to copy, modify, publish, use, compile, sell, or\n\u003e distribute this software, either in source code form or as a compiled\n\u003e binary, for any purpose, commercial or non-commercial, and by any\n\u003e means.\n\u003e\n\u003e In jurisdictions that recognize copyright laws, the author or authors\n\u003e of this software dedicate any and all copyright interest in the\n\u003e software to the public domain. We make this dedication for the benefit\n\u003e of the public at large and to the detriment of our heirs and\n\u003e successors. We intend this dedication to be an overt act of\n\u003e relinquishment in perpetuity of all present and future rights to this\n\u003e software under copyright law.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n\u003e EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\u003e MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n\u003e IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n\u003e OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n\u003e ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n\u003e OTHER DEALINGS IN THE SOFTWARE.\n\u003e\n\u003e For more information, please refer to \u003chttp://unlicense.org/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartpb%2Fhashblot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuartpb%2Fhashblot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartpb%2Fhashblot/lists"}