use updated crypto api

Since R16 of Erlang the Crypto API has changed.