Closed

Password encryption for login form

This project received 8 bids from talented freelancers with an average bid price of $127 USD.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
N/A
Total Bids
8
Project Description

I Need Password encryption for login Form , i used web2py before and this was a built in function , i asked the framework maker about how can i implement it and he answered this :

The logic is very complex because it needs to deal with many options and not-break backward compatibility.

Normally an encrypted password looks like

algorithm$salt$hash algorithm$$hash (no salt) hash (legacy)

the hash is computing using the algorithm, the salt, and optionally a user provided key. The key is unique. The salt is different for each password.

Every time you call CRYPT()('password') you get a LazyCrypt object. This object can be serialized into a string. The string you get is always different because it contains a random salt. You cannot compare two of those strings because you always get false, even for the same password. Yet you can compare a LazyObject with a string and the lazy object will use the same algorithm and the same salt from the string to compute the hash and compare it with the hash in the string. Example:

>>> a = CRYPT()('password')
>>> b = CRYPT()('password')
>>> sa = str(a)
>>> sb = str(b)
>>> sa == sb
False
>>> a == sb
True
>>> c = CRYPT()('wrong')
>>> c == sb
False

attached is the class for the function to make that in python , what i wont is to implement this in php ,

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online