JUserHelper::getSalt

Returns a salt for the appropriate kind of password encryption.

Optionally takes a seed and a plaintext password, to extract the seed of an existing password, or for encryption types that use the plaintext in the generation of the salt.