Using Drupal 7 hashing method in Drupal 6 I want to use Drupal 7 hashing method in Drupal 6 for generating hash(not for password).
I will be using a key(say username) generate hash and store it in DB, later on when user provides username i will be generating hash for input and compare with the one that's stored in database.

include 'd7_modified_password.inc';
$key = "random_string";
print user_hash_password($key);


This generates a random string every time even though $key is unchanged. How can I use this so that I can use this method to compare two keys.
Need to use user_check_password() method to compare existing key. Guess I overlooked it earlier.