Update for deprecated crypto function calls

The main purpose of this pull request is to fix the deprecated call to `crypto:sha`, which has been replaced with `crypto:hash`. I'm know this works as far back as release 15. Starting with release 16 I believe the function was removed completely. If not 16, then definitely 17, because using the latest release of Erlang I can't get it to compile using `crypto:sha`.