Create crypt.php

Needs to be tidied later. WIP.