{"id":22960236,"url":"https://github.com/stringmanolo/5um","last_synced_at":"2025-04-02T02:43:18.389Z","repository":{"id":187701280,"uuid":"677519002","full_name":"StringManolo/5um","owner":"StringManolo","description":"Fast \"hash\" algorithm.","archived":false,"fork":false,"pushed_at":"2023-08-11T22:36:49.000Z","size":9830,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-07T20:37:57.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/StringManolo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-11T19:33:16.000Z","updated_at":"2023-08-11T22:26:50.000Z","dependencies_parsed_at":"2025-02-07T17:41:22.558Z","dependency_job_id":"460fa5b7-8197-47ef-817d-7145385f9e93","html_url":"https://github.com/StringManolo/5um","commit_stats":null,"previous_names":["stringmanolo/5um"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2F5um","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2F5um/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2F5um/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2F5um/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StringManolo","download_url":"https://codeload.github.com/StringManolo/5um/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246746879,"owners_count":20827061,"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":"2024-12-14T18:31:41.604Z","updated_at":"2025-04-02T02:43:18.370Z","avatar_url":"https://github.com/StringManolo.png","language":"C","readme":"# 5um\nFast \"hash\" algorithm designed for insecure hashing usage.  \nSometimes you need a fast hash but you don't care about the security of the hash. \n\n#### Use Cases\n- Detect if a file has changed  \nYou can check if a file has changed by using this hash funcion.\n- Fast Lookup in Large Data Sets    \nIf you need to compare large volumes of data and only require a quick match  \n- Duplicate Detection  \nYou can employ \"5um\" to identify duplicates in extensive file collections where precision isn't critical, and you only need a fast way to identify similar files  \n- Real-time Checksum Generation  \nIn applications where rapid data integrity checks are needed in real-time, \"5um\" could provide a balance between speed and simplicity  \n- Cache Key Generation  \nIf you wish to use a hash for caching and retrieving data, and security isn't a concern, \"5um\" could be suitable  \n- Search Algorithm Optimization  \nCertain search algorithms, such as those based on hash tables, might benefit from a fast hash like \"5um\" to expedite the search process  \n\n#### Installation\n1. Install the package\n```bash\nnpm install 5um\n```\n\n2. Compile the c function for your architecture\n```bash\ngcc -o ./node_modules/5um/dist/c/hash5um.so -shared -fPIC ./node_modules/5um/src/c/hash5um.c\n```\n\n#### Usage\n- As a system command  \n\n```bash\nnpx 5um hello.txt\n```\n\n- As a module\n```javascript\nconst hash5um = require(\"5um\");\n\nconst inputFile = process.argv[2];\nconst hash = hash5um('./hello.txt'); // returns a BigInt\n\nconsole.log(hash.toString(16));\n```\n\n\n```typescript\n// npm install --save-dev @types/ffi-napi\n\nimport hash5um from \"5um\";\n\nconst inputFile = process.argv[2];\nconst hash = hash5um('./hello.txt'); // returns a BigInt\n\nconsole.log(hash.toString(16));\n```\n\n##### Characteristics\n- Fast\n- Easy to use\n- Insecure\n- Reversible\n- Predictable\n- Collisions\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringmanolo%2F5um","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringmanolo%2F5um","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringmanolo%2F5um/lists"}