Per Toor ath the thread located at the URL below,\
To get MD5 hash of the password you use salt which is computed semi-randomly. Then salt along with actual password is used to create MD5 hash. The string between $1$ and $ in your secret is the salt, after that you have actual MD5 hash.
Hope that helps,
Thank you Paul. That makes it clear for me. I also found a page explaining the md5 hashing in IOS: http://wiki.nil.com/MD5_Password_Hashing_in_IOS
For the second part of my question, is the hash represented using base64 instead of hexa?