Create a cookie and return it as a string.
Data to encode with the cookie
The secret key
Optional
The name for the cookie; defaults to session
session
The cookie as string
Create a cookie and return it as a string.