tags:

views:

30

answers:

2

Does placing a crypted password into a variable and assigning it to another variable makes a difference to crypting it one time assigned to the said one variable?

such as:

$myPassword = "1234567"; $crypted_password = "{crypt}".crypt($myPassword); $userPassword = $crypted_password

and,

$myPassword = "1234567"; $userPassword = "{crypt}".crypt($myPassword);

Note: using PHP here. =) Thanks!

+1  A: 

No difference in the result between the first case and the second, except an extra CPU cycle or two doing the extra assignment. Might as well just use the latter, it's more concise.

Amber
A: 

huh? I was following right up until you said "makes a difference to crypting it one time assigned to the said one variable"...

Without a full understanding of your question, I'm going to guess that you are asking whether assigning the encrypted value to an intermediary variable has any intrinsic value. The answer is no, it doesn't.

Chris Lively