def remember_encrypted_identity(self, subject, encrypted):
try:<EOL><INDENT>encoded = base64.b64encode(encrypted).decode('<STR_LIT:utf-8>')<EOL>subject.web_registry.remember_me = encoded<EOL><DEDENT>except AttributeError:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>logger.debug(msg)<EOL><DEDENT>
Base64-encodes the specified serialized byte array and sets that
base64-encoded String as the cookie value.

The ``subject`` instance is expected to be a ``WebSubject`` instance
with a web_registry handle so that an HTTP cookie may be set on an
outgoing response.  If it is not a ``WebSubject`` or that ``WebSubject``
does not have a web_registry handle, this implementation does
nothing.

:param subject: the Subject for which the identity is being serialized

:param serialized: the serialized bytes to persist
:type serialized: bytearray