added support for crypt/rand