{"id":24836846,"url":"https://github.com/pioner92/react-native-xxhash","last_synced_at":"2026-04-08T10:01:57.552Z","repository":{"id":273225125,"uuid":"918400733","full_name":"pioner92/react-native-xxhash","owner":"pioner92","description":"💪 A high-performance React Native library for generating xxHash hashes using C++ and JSI","archived":false,"fork":false,"pushed_at":"2025-09-27T19:14:42.000Z","size":1752,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T05:45:20.229Z","etag":null,"topics":["android","hash","ios","javascript","jni","jsi","quickhash","react","react-native","react-native-hash","react-native-jsi","react-native-xxhash","xxhash","xxhash-library","xxhash3"],"latest_commit_sha":null,"homepage":"","language":"C++","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/pioner92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-17T21:17:28.000Z","updated_at":"2025-09-30T13:57:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3a8ff51-4579-497a-98ee-e2f9128831d9","html_url":"https://github.com/pioner92/react-native-xxhash","commit_stats":null,"previous_names":["pioner92/react-native-xxhash"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/pioner92/react-native-xxhash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioner92%2Freact-native-xxhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioner92%2Freact-native-xxhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioner92%2Freact-native-xxhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioner92%2Freact-native-xxhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pioner92","download_url":"https://codeload.github.com/pioner92/react-native-xxhash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioner92%2Freact-native-xxhash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31549900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","hash","ios","javascript","jni","jsi","quickhash","react","react-native","react-native-hash","react-native-jsi","react-native-xxhash","xxhash","xxhash-library","xxhash3"],"created_at":"2025-01-31T05:43:57.953Z","updated_at":"2026-04-08T10:01:57.545Z","avatar_url":"https://github.com/pioner92.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-xxhash\n\nA React Native library for hashing strings using the fast and deterministic xxHash algorithm, written in C++ with JSI for high performance. This library provides support for both 64-bit and 128-bit hashing.\n\n## Features\n\n- **High Performance**: xxHash is one of the fastest non-cryptographic hash functions.\n- **Deterministic Hashing**: Ensures consistent results for the same input.\n- **128-bit and 64-bit Support**: Choose between 128-bit and 64-bit hash outputs based on your use case.\n- **Cross-Platform**: Supports both iOS and Android in React Native projects.\n\n# Benchmarks (https://xxhash.com)\n\u003cimg width=\"772\" height=\"712\" alt=\"Screenshot 2025-10-23 at 09 48 25\" src=\"https://github.com/user-attachments/assets/792c220b-54cc-45d7-8e62-e26757d11e85\" /\u003e\n\n## Installation\n\nTo install the library, use either `npm` or `yarn`:\n\n```sh\nnpm install react-native-xxhash\n```\n\n```sh\nyarn add react-native-xxhash\n```\n\n## iOS\n```sh\npod install\n```\n\n---\n\n## Usage\n\nHere’s how to use the `react-native-xxhash` library in your React Native project:\n\n### Import the Functions\n```javascript\nimport { hash128, hash64 } from 'react-native-xxhash';\n```\n\n### Hash a String (128-bit)\nThis function generates a fast and deterministic 128-bit hash for a given string input.\n\n```javascript\nconst resultHash128 = hash128(\"hello world\");\nconsole.log('128-bit hash:', resultHash128);\n// Output: A 128-bit hash string\n```\n\n### Hash a String (64-bit)\nThis function generates a fast and deterministic 64-bit hash for a given string input.\n\n```javascript\nconst resultHash64 = hash64(\"hello world\");\nconsole.log('64-bit hash:', resultHash64);\n// Output: A 64-bit hash string\n```\n\n### Example Usage in a Component\n```javascript\nimport React, { useEffect } from 'react';\nimport { Text, View } from 'react-native';\nimport { hash128, hash64 } from 'react-native-xxhash';\n\nconst App = () =\u003e {\n  useEffect(() =\u003e {\n    const hash128Result = hash128(\"react-native\");\n    const hash64Result = hash64(\"react-native\");\n\n    console.log(\"128-bit hash:\", hash128Result);\n    console.log(\"64-bit hash:\", hash64Result);\n  }, []);\n\n  return (\n    \u003cView style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}\u003e\n      \u003cText\u003eCheck your console for hash results!\u003c/Text\u003e\n    \u003c/View\u003e\n  );\n};\n\nexport default App;\n```\n\n---\n\n## API Reference\n\n### `hash128(input: string): string`\n- **Description**: Generates a 128-bit hash for the given string input.\n- **Parameters**:\n  - `input` (string): The string to hash.\n- **Returns**: A 128-bit hash as a string.\n\n### `hash64(input: string): string`\n- **Description**: Generates a 64-bit hash for the given string input.\n- **Parameters**:\n  - `input` (string): The string to hash.\n- **Returns**: A 64-bit hash as a string.\n\n---\n\n## License\n\n`react-native-xxhash` is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpioner92%2Freact-native-xxhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpioner92%2Freact-native-xxhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpioner92%2Freact-native-xxhash/lists"}