Create cookie with random string

I have added a function that would allow users to add a cookie with random string. It is very helpful when you wants to create a cookie with random alphanumeric values. A user has to provide random string size along with cookie name and good to go! :)