Isolates crypto specific functionality to new file so both tests usage
can play.