Doing it like you said, it still appears to store the encrypted form in the hash file, so I'm happy enough with that.
Thanks for your help, You're scripts rock :)