{"id":24919323,"url":"https://github.com/dbyington/hash-o-matic","last_synced_at":"2026-07-04T06:01:58.613Z","repository":{"id":146943971,"uuid":"115221965","full_name":"dbyington/hash-o-matic","owner":"dbyington","description":"A hashing server written in Go","archived":false,"fork":false,"pushed_at":"2023-01-12T13:44:09.000Z","size":56,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-03-28T09:43:16.304Z","etag":null,"topics":["go","golang","hashing","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dbyington.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":"2017-12-23T21:08:58.000Z","updated_at":"2023-01-12T13:19:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"6eae5fd3-76d3-4fb5-a3b8-63a072ff4327","html_url":"https://github.com/dbyington/hash-o-matic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbyington/hash-o-matic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbyington%2Fhash-o-matic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbyington%2Fhash-o-matic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbyington%2Fhash-o-matic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbyington%2Fhash-o-matic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbyington","download_url":"https://codeload.github.com/dbyington/hash-o-matic/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbyington%2Fhash-o-matic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35111429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"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":["go","golang","hashing","rest-api"],"created_at":"2025-02-02T10:17:56.004Z","updated_at":"2026-07-04T06:01:58.595Z","avatar_url":"https://github.com/dbyington.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## This is a playground. There are changes in different branches that include more idiomatic code.\nFeel free to browse around.\nWhen I get time I do a little more. Some changes have not been merged because tests have not been updated. \n\n# [Hash-O-Matic](https://github.com/dbyington/hash-o-matic) \nA Go based hashing REST API server\n\n## What it does\n\nThe server accepts a form `POST` to `http://localhost:8080/hash` in the form of `password=stringToHa$h`. At this time the `%` character seems to be the only standard utf8 ASCII character not accepted, so avoid that one for now.\nWhen the `POST` comes in the server responds with an id (numeric) that can be used to retrieve the calculated hash. The hash is retrieved by using the id in a `GET` to `http://localhost:8080/hash/{id}`.\nThe server responds to the `POST` immediately with the id, however system waits 5 seconds before actually generating the hash. Attempts to immediately retrieve the hash will not fail but will receive a 202 `Accepted` and a JSON body containing `{\"ErrorMessage\":\"hash string not ready\"}`. Meaning, \"your request has been received. Further processing needs to be done to fulfill your request, come back later.\"\n\n### Running the server\n\nRunning `hash-o-matic` will log connections to STDOUT, so you will see the queries come in. Logging control is planned for a future update.\n\n```\n$\u003e hash-o-matic\n2018/01/06 16:25:00 Server listening on: :8080\n2018/01/06 16:34:31 [::1]:54591 GET / curl/7.49.0\n2018/01/06 16:34:45 [::1]:54592 GET /hash curl/7.49.0\n2018/01/06 16:35:19 [::1]:54597 POST /hash curl/7.49.0\n2018/01/06 16:35:33 [::1]:54598 POST /hash curl/7.49.0\n2018/01/06 16:35:42 [::1]:54599 GET /hash/1 curl/7.49.0\n```\n\nYou can use any tool you wish to send the `POST` and `GET` requests to the server, including `curl`.\n```\n$\u003e curl -XPOST http://localhost:8080/hash -d 'password=angryMonkey' -H 'Content-Type: application/x-www-form-urlencoded'\n{\"HashId\":1}\n$\u003e curl http://localhost:8080/hash/1\n{\"HashString\":\"ZEHhWB65gUlzdVwtDQArEyx+KVLzp/aTaRaPlBzYRIFj6vjFdqEb0Q5B8zVKCZ0vKbZPZklJz0Fd7su2A+gf7Q==\"}\n```\n\n### Stopping the server\n\nStopping the running `hash-o-matic` server can be done by simply entering `^C` or by sending a `PUT` request to `http://localhost:8080/shutdown`. Either shutdown method will wait for any current sessions to complete before closing the connection and exiting.\n\n\n`^C` method\n```\n$\u003e hash-o-matic\n2018/01/06 17:24:50 Server listening on: :8080\n^C2018/01/06 17:24:53 Received signal interrupt; shutting down\n2018/01/06 17:24:53 Stopping server\n2018/01/06 17:24:53 Shutdown complete.\n$\u003e\n```\n`PUT` method\nStart server:\n```\n$\u003e hash-o-matic\n2018/01/06 17:25:40 Server listening on: :8080\n\n```\nSend `PUT`:\n```\n$\u003e curl -XPUT http://localhost:8080/shutdown\nshutting down...%\n$\u003e\n```\nOutput by server:\n```\n2018/01/06 17:26:21 Received call to /shutdown, shutting down\n2018/01/06 17:26:21 Stopping server\n2018/01/06 17:26:21 Shutdown complete.\n$\u003e\n```\n\n## Getting Started\n\nClone this repo `git clone https://github.com/dbyington/hash-o-matic.git`\nThen cd into `hash-o-matic` and run `go get`\n\n### Prerequisites\n\nYou will need [Go](https://golang.org/) (Golang)\n\n\n### Installing\n\nInstall Go\nClone this repo\n`workdir $\u003e git clone https://github.com/dbyington/hash-o-matic.git`\nChange into the `hash-o-matic` directory and run `go install`\n\n```\nworkdir $\u003e cd hash-o-matic\nworkdir\\hash-o-matic $\u003e go install\n```\n\nOr you can run the server with the `go run` command.\n\n```\nworkdir\\hash-o-matic $\u003e go run hash-o-matic.go\n```\n\n## Running the tests\n\nTo run the included tests run\n```\nhash-o-matic $\u003e go test ./...\n```\n\n## Deployment\n\nI doubt you want to actually deploy this for anything, and I recommend you don't.\n\n## Built With\n\n* [Pride](https://www.google.com/search?q=pride)\n* [Go](https://golang.org)\n\n## Contributing\n\nSince this is more of a learning project for me I would appreciate any comments, updates, or fixes come to me as an issue with a description and a clue, rather than straight-up code. Thanks.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/dbyington/hash-o-matic/tags).\n\n## Authors\n\n* **Don Byington** - *Initial work* - [Don](https://github.com/dbyington)\n\nSee also the list of [contributors](https://github.com/dbyington/hash-o-matic/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n* The Go documentation project [Go Doc](https://golang.org/doc/)\n* [Go by Example](https://gobyexample.com/)\n* [Golang Book](http://www.golang-book.com/)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbyington%2Fhash-o-matic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbyington%2Fhash-o-matic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbyington%2Fhash-o-matic/lists"}