'Creates cookie payload data.
Args:
email: The user\'s email address.
admin: True if the user is an admin; False otherwise.
Returns:
String containing the cookie payload.'

@staticmethod
def _CreateDevAppServerCookieData(email, admin):

    if email:
        user_id_digest = hashlib.md5(email.lower()).digest()
        user_id = ('1' + ''.join([('%02d' % ord(x)) for x in user_id_digest])[:20])
    else:
        user_id = ''
    return ('%s:%s:%s' % (email, bool(admin), user_id))
