Update deprecated hash functions

crypto:md5 has been deprecated and replaced with crypto:hash. erlang:md5 has been deprecated replaced with erlang:phash. These deprecated functions cause compilation to fail in newer versions of Erlang (tested on Erlang R16B03-1) and need to be replaced as the functions will be removed completely in future versions of Erlang. This pull request replaces the deprecated functions with their successors.