HTTP service that hashes passwords using SHA512 and Base64 encoding
To begin, start the server (requires Go 1.8):
$ go run hash_password.go
Requests may then be made to http://localhost:8080. One of two requests is permitted:
- Hash password
- Shut down server
A delay of five seconds is applied to each response.
Hash a password via an HTTP POST to /, e.g.
$ curl -s --data "password=angryMonkey" http:/localhost:8080/
ZEHhWB65gUlzdVwtDQArEyx+KVLzp/aTaRaPlBzYRIFj6vjFdqEb0Q5B8zVKCZ0vKbZPZklJz0Fd7su2A+gf7Q==
Shut down the server via an HTTP POST to /shutdown, i.e.
$ curl -s -X POST http:/localhost:8080/shutdown