Crypto cleanup

This patch gets rid of crypto warnings for deprecated calls
to crypto:md5/1 and crypto:sha_mac/2 and updates them with calls
to crypto:hash/2 and crypto:hmac/3 respectively.