MD5 SHA_MAC with crypto in erlang
Just so you know because this tripped me up.
When you are trying to get crypto to work by doing something as simple as erlang:sha_mac(Key, String) and erlang:md5(String) and getting nothing but a port_control/3 error. Don’t freak out, it’s just an error communicating with the call to the c library that is crypto. So before you freak out (like I did), recompile erlang 2 or 3 times trying different versions and configurations (hipe, smp etc like I did), go through the source (like I did), and waste hours(like I did), stop drop and remember erlang loves long running processes and just do.
View CodeERLANG | |
application:start(crypto) | |
Then palm to face (like I did).