{"id":25703418,"url":"https://github.com/dashpay/x11-hash-js","last_synced_at":"2025-04-30T06:45:53.073Z","repository":{"id":56869011,"uuid":"63282312","full_name":"dashpay/x11-hash-js","owner":"dashpay","description":"x11 javascript hashing algorithm in pure javascript","archived":false,"fork":false,"pushed_at":"2018-11-15T14:33:08.000Z","size":647,"stargazers_count":19,"open_issues_count":3,"forks_count":26,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-30T10:17:01.265Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashpay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-13T21:56:24.000Z","updated_at":"2024-10-25T10:57:36.000Z","dependencies_parsed_at":"2022-08-20T07:21:09.178Z","dependency_job_id":null,"html_url":"https://github.com/dashpay/x11-hash-js","commit_stats":null,"previous_names":["quantumexplorer/x11-hash-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fx11-hash-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fx11-hash-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fx11-hash-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fx11-hash-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashpay","download_url":"https://codeload.github.com/dashpay/x11-hash-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240610764,"owners_count":19828858,"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-02-25T05:29:29.800Z","updated_at":"2025-02-25T05:29:30.252Z","avatar_url":"https://github.com/dashpay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# x11-hash-js\n\n\u003e Performs the [x11 hashing](https://docs.dash.org/en/latest/introduction/features.html#x11-hash-algorithm) algorithm used in the [Dash cryptocurrency](https://dash.org) in JavaScript.\n\n## Usage\n\nInstall the library as a Node module.\n\n```\n$ npm install --save @dashevo/x11-hash-js\n```\n\nReference the library within a Node module.\n\n```js\nvar x11 = require('x11-hash-js');\n\nconsole.log(x11.digest('The great experiment continues.'));\n// -\u003e '4da3b7c5ff698c6546564ebc72204f31885cd87b75b2b3ca5a93b5d75db85b8c'\n```\n\nDownload the browserified library from the [dist](https://github.com/dashpay/x11-hash-js/tree/master/dist) folder and include it in your HTML.\n\n```html\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cscript src='./dist/x11-hash.min.js'\u003e\u003c/script\u003e\n  \u003cscript\u003e\n  let x11 = require('x11hash');\n  console.log(x11.digest('The great experiment continues.'));\n  // -\u003e '4da3b7c5ff698c6546564ebc72204f31885cd87b75b2b3ca5a93b5d75db85b8c'\n  \u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e\n```\n\nCall individual hash functions within the x11 digest.\n\n```js\nconsole.log(x11.blake('The great experiment continues.'));\n// -\u003e '8f257723af0741fb7d3d8c264a5ea86a57d4ae833557de04f5f78fad1ac17d6dfa1ae4a78a7564c08fc21d5d8cdd2793ca17d5500ecc2b43eb8aaf9c220d7b49'\n\nconsole.log(x11.bmw('The great experiment continues.'));\n// -\u003e '7b30b4f1ccd83692bc6a01b1f7e374b59b81da6b21421679ae59d84c4f73afec5a0857565b6ebc1b9ddf9da5e75bf1ecd0ba6f5a75b7926ba9278385fb83533c'\n\nconsole.log(x11.cubehash('The great experiment continues.'));\n// -\u003e '64394bcb9d7844070c8516480ea5f03f68386f33c3829e08bf38bea11f09eba5806aa7831cfbe8e515678b0cad7d4ac888ea2b9ea8f63f0cc918d5a6a76b7ae9'\n\nconsole.log(x11.echo('The great experiment continues.'));\n// -\u003e 'b1db282b1672f3423c1e1bdf4496a8ddda0b6f483e92e9a8be2efbaab0ea230814f1f1485d919285deac13794dc215000eb39a47ac32bfc07299a0475049be2e'\n\nconsole.log(x11.groestl('The great experiment continues.'));\n// -\u003e '6cea044acf31194eab7d1adb704712c34dd4f0b6a470b0f297832addab691faa459474c651efdbebddb138a2a9adb41705e0fb75741775314ddd8e5449ace986'\n\nconsole.log(x11.jh('The great experiment continues.'));\n// -\u003e '90c7090e9d9a45bc79f476ae7fa3e7e4416d1c26b127d1d418ee9bd96b541933b0f144a0d4c6594944393e39fb6b98ceb54752af55198e00953d638183482521'\n\nconsole.log(x11.keccak('The great experiment continues.'));\n// -\u003e '4c7e9c893fcdc87a2fd604574a4a5b9a0b6864665ed19057dedf24858314690ba45d6bbcfb86cd7182d1677e2d30dad9716ee99eb8ea267c6638f47ef20e0226'\n\nconsole.log(x11.luffa('The great experiment continues.'));\n// -\u003e 'ea531ce38473fc4bd508c5396194dd6201699d47e25bd4d6b0c5dc7ab0627831e01ea027ebe33d80f608f139aa9fd0c6d923f32de9b5d714026300ed1c9a2f48'\n\nconsole.log(x11.shavite('The great experiment continues.'));\n// -\u003e '6fbca2d53a26e22e6df1a8064230bdb98c0a612b64dad958f16757cf8ee8526862a0e4f56be69b98b07f0ea47db7211cf42352443fc806013374e819f26cb923'\n\nconsole.log(x11.simd('The great experiment continues.'));\n// -\u003e '13ae2c08260f7d5abcfa791446800c1eaed8c5332ec437222428a28823aa2ba19a5907a2c860c12c0b894bdf9c0d64f807cb9512f1ed42980d15747ff4a26c1c'\n\nconsole.log(x11.skein('The great experiment continues.'));\n// -\u003e '88a9dd727bb9b7cbd59612edbcd6b321427f473acc5673d7dffb16071dc71821d0cc1b94dccf7e5f71a0a94019a7e764d3315c3f4a40f73aee4ad98c75bcc2f7'\n\n```\n\n## API\n\n### x11.digest(str)\n\nReturns a `string` representation of the x11 hash of an input `string` ***str***.\n\n#### str\n\nType: `string`\n\nThe string to be hashed.\n\n### x11.digest(input, inputFormat, outputFormat)\n\nReturns the x11 hash of ***input*** with the input and output types variable between a `string`, 8 bit `array` or 32 bit `array`\n\n#### input\n\nType: `string` or `array`\n\nThe input data to be hashed.\n\n#### inputFormat\n\nType: `number`\n\nSpecifies the format and type of the ***input*** value:\n\n - **0**: `string`\n - **1**: 8 bit `array`\n - **2**: 32 bit `array`\n\n#### outputFormat\n\nType: `number`\n\nSpecifies the format and type of the return value:\n\n - **0**: `string`\n - **1**: 8 bit `array`\n - **2**: 32 bit `array`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fx11-hash-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashpay%2Fx11-hash-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fx11-hash-js/lists"}