Not to sound harsh, but that isn't encryption. All your doing is swapping characters which might create unreadable text but not undecipherable (see the crypto quote puzzles newspapers). Probably the easiest encryption to implement is XOR, user inputs text to encrypt and a key, you encrypt by XORing the text with the key, then do the same to decrypt. This way the encryption relies on the key being secure and not the algorithm. I also don't see why you hash the encrypted key, I would probably hash the text before encryption and again after to verify data integrity.
On second thought regarding hashing the password, it might be a good idea if the hash (128 bits I believe) is larger (and more unique) then the original password.