Why would a link contain a password?
I'd send a link containing username & destination url. When the user accesses the link the page recognizes the password wasn't included. Username and password is sent to server, password hashed with md5 and compared with database. If valid sent to the destination address. give the user the option to change users. Annoys users when they send a copy to their buddy and their buddy can't logon.
I like to use a table of just current users. Typically containing a unique id (md5 hash of timestamp, username, and a random phrase created at installation), ip address, timestamp, whatever else i might normally store using sessions.
If the user has to be able to access a page without using a password (such as for a survey), i'd create a new unique user in the users table. send the email with a link including just the unique id md5 hash. The script on seeing the hash would check the users table. If a valid entry is found then update the table to the current ip and update the timestamp. This way the link could be used as a one time only deal. Not valid with another ip or after it expires in a set period (based from timestamp).
Any type of crypt is expensive in cpu time. Using one way hashes like md5() can speed things up. Just don't include passwords in anything sent to the user, encrypted or not, unless the user specifically asks for a password reset. and you're creating a new random password for password resets right? not storing the passwords in plain text?
we'd have to know more about what you're trying to do to help you out much more.