Giter VIP home page Giter VIP logo

jcpassword's People

Contributors

jakepearson avatar

Watchers

 avatar  avatar

jcpassword's Issues

Hash and Encode Passwords over HTTP

Change your program so that when launched your code starts and listens for HTTP requests on
a provided port. Listen for a POST to /hash with a body of the form
password=<the_provided_password>. The response should be the base64 encoded
string of the SHA512 hash of the provided password. The server should not respond
immediately, it should leave the socket open for 5 seconds before responding.

For example: curl —data “password=angryMonkey” http://localhost:8080/hash should return ZEHhWB65gUlzdVwtDQArEyx+KVLzp/aTaRaPlBzYRIFj

Hash End-Point Returns Identifier

Modify the /hash end-point so that it returns an identifier that can be used later to retrieve a
hashed password value. The request should be initiated identically to step 2. The identifier
should return immediately but the password should not be hashed for 5 seconds.

For example: curl —data "password=angryMonkey" http://localhost:8080/hash should return 42 immediately.

Statistics End-Point

Provide a statistics endpoint to get basic information about your password hashes.
A GET request to /stats should return a JSON object with 2 key/value pairs. The total
key should have a value for the count of password hash requests made to the server so far. The
average key should have a value for the average time it has taken to process all of those
requests in milliseconds.

For example: curl http://localhost:8080/stats should return something like:
{"total": 1, "average": 123}

Update README

  • Add list of possible features
  • Describe cloning, testing, and running processes

GET a Hashed Password

Provide the ability to retrieve an already hashed password with a GET to /hash/{id}
To continue our example from the last step, 5 seconds after that curl command is issued you
should be able to curl http://localhost:8080/hash/42 and get back the value of
ZEHhWB65gUlzdVwtDQArEyx+KVLzp/aTaRaPlBzYRIFj6vjFdqEb0Q5B8zVKCZ0vKbZP ZklJz0Fd7su2A+gf7Q==

Hash and Encode a Password String

Provide the ability to take a password as a string and return a Base64 encoded string of the
password that has been hashed with SHA512 as the hashing algorithm.

For example, if given the string angryMonkey the expected return value is
ZEHhWB65gUlzdVwtDQArEyx+KVLzp/aTaRaPlBzYRIFj6vjFdqEb0Q5B8zVKCZ0vKbZP ZklJz0Fd7su2A+gf7Q==

Graceful Shutdown

Provide support for a “graceful shutdown request”. If a request is made to /shutdown all
remaining requests should be allowed to complete, no additional requests should be allowed to
be processed, and the server should stop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.