{"id":19594992,"url":"https://github.com/zessx/hashicon","last_synced_at":"2025-07-18T02:38:14.520Z","repository":{"id":16059176,"uuid":"18803352","full_name":"zessx/hashicon","owner":"zessx","description":"Generate unique icon base on a hash","archived":false,"fork":false,"pushed_at":"2020-11-22T10:33:49.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T07:13:18.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://work.smarchal.com/hashicon","language":"PHP","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/zessx.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":"2014-04-15T14:37:33.000Z","updated_at":"2020-11-22T10:33:51.000Z","dependencies_parsed_at":"2022-08-31T12:50:39.434Z","dependency_job_id":null,"html_url":"https://github.com/zessx/hashicon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fhashicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fhashicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fhashicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fhashicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zessx","download_url":"https://codeload.github.com/zessx/hashicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240868050,"owners_count":19870525,"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-11-11T08:45:26.689Z","updated_at":"2025-02-26T14:22:37.895Z","avatar_url":"https://github.com/zessx.png","language":"PHP","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=KTYWBM9HJMMSE\u0026lc=FR\u0026item_name=Buy%20a%20coffee%20to%20zessx%20%28Samuel%20Marchal%29\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abmac%3aNonHosted"],"categories":[],"sub_categories":[],"readme":"![HashIcon](HashIcon.png)\n========\n\nHashIcon is a PHP Class which generate unique icon based on a hash.  \nIcons are generated in a Base64 format.\n\nFunctions\n---------\n``` php\nfunction toIcon($algo, $hash, $size = 300, $format = 'png');\n```\n\nUsage\n-------\n``` php\nrequire 'HashIcon.php';\n\n$hash  = hash('sha256', 'Lorem ipsum dolor sit amet.');\n$image = HashIcon::toIcon(HashIcon::SHA256, $hash);\n\nheader('Content-type:image/png');\necho base64_decode($image);\n\n// or \u003cimg src=\"data:image/png;base64,\u003c?= $image ?\u003e\"\u003e\n```\n\n![HashIcon example](sample.png)\n\nAccepted algorythms\n-------------------\n- HAVAL-256,3\n- HAVAL-256,4\n- HAVAL-256,5\n- GOST\n- RIPEMD-256\n- SHA-256\n- Snefru\n\nAccepted formats\n----------------\n- PNG\n- JPG\n- GIF\n\nTODO-LIST\n---------\nAdd a reverse function : `HashIcon::toHash()`.  \nAdd algorythms :\n- Adler-32\n- CRC-32\n- CRC-32B\n- MD2\n- MD4\n- MD5\n- HAVAL-128,3\n- HAVAL-128,4\n- HAVAL-128,5\n- HAVAL-160,3\n- HAVAL-160,4\n- HAVAL-160,5\n- HAVAL-192,3\n- HAVAL-192,4\n- HAVAL-192,5\n- HAVAL-224,3\n- HAVAL-224,4\n- HAVAL-224,5\n- RIPEMD-128\n- RIPEMD-160\n- RIPEMD-320\n- Tiger-128,3\n- Tiger-128,4\n- Tiger-160,3\n- Tiger-160,4\n- Tiger-192,3\n- Tiger-192,4\n- SHA-1\n- SHA-384\n- SHA-512\n- Whirlpool\n\n \nLegals\n------\n- Author : [zessx](https://github.com/zessx)\n- Licence : [MIT](http://opensource.org/licenses/MIT) \n- Contact : [@zessx](https://twitter.com/zessx)\n\nDonations\n---------\n\n[![Buy me a coffee !](http://doc.smarchal.com/bmac)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=KTYWBM9HJMMSE\u0026lc=FR\u0026item_name=Buy%20a%20coffee%20to%20zessx%20%28Samuel%20Marchal%29\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abmac%3aNonHosted)\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzessx%2Fhashicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzessx%2Fhashicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzessx%2Fhashicon/lists"}