when used in cryptography, commonly the password protects a long (machine generated) key, and the key protects the data. the key is so long a brute force attack (directly on the data) is impossible. a key derivation function is used, involving many thousands of iterations (salted & hashed), to slow down password cracking attacks.