using MCRYPT to generate session IDs