reworked crypto (removed slow equals and added verify hash apis)