Something about encryption and hashing has always bothered me.
Given a cryptographically secure hash function $H$, I can produce an arbitrarily long key from any seed $s$ by recursively applying $H$ to the seed $(s, H(s), H(H(s)), ...)$. Then I can XOR the resulting array with any plaintext $x$ to produce my ciphertext.
Similarly, given an encryption function $E$, I can produce a hash of any input $x$ by simply encrypting each block of $x$ with itself, and then XORing the results together.
So why, then, do we use different functions for hashing and crypto (say, SHA-256 vs. AES)? If one of them is secure, shouldn't it work for the other purpose too?