New_PHP_Guy wrote:I am attempting to add some form security using a salted sha1 hash which I plan to use as a form security token.
What exactly is the purpose of this security token? If it is intended to be a token to detect CSRF, then the salt is pointless: you wouldn't even need a cryptographic hash per se, though it makes sense to use one to help avoid attacks involving the pseudorandom number generator. SHA-1 is still alright for this purpose, though you might as well use one of the algorithms in the SHA-2 family (or SHA-3, but I don't think hash() caters for it yet).
EDIT:
Oh, I see that you did imply that this was for CSRF detection.
New_PHP_Guy wrote:Is salting depricated when creating tokens not passwords?
Salting is not deprecated when creating tokens: salting has always been useless when creating tokens. The basic purpose of using salts is so that identical input to a cryptographic hash function will result in differing output, which is useful for the storage of passwords. It makes no sense at all for tokens since the token would have been (pseudo)randomly generated to be used for a short period of time.
You don't even need to apply a cryptographic hash function to create a token: if you're using a "truly" random source to generate the token, then no matter how many unhashed tokens an attacker acquires, the attacker will not have enough information generate a token that matches the next token that your script will generate (and hence defeat the CSRF protection). But since you are probably using a pseudorandom number generator, you should use a cryptographic hash.
When cluelessPHP claimed that "salting is deprecated", it was probably with reference to the simple use of a salt with a cryptographic hash algorithm for password storage. Salting is of course not deprecated.