code: def remember_encrypted_identity(self, subject, encrypted):
          
          try:
              # base 64 encode it and store as a cookie:
              encoded = base64.b64encode(encrypted).decode('utf-8')
              subject.web_registry.remember_me = encoded
          except AttributeError:
              msg = ("Subject argument is not an HTTP-aware instance.  This "
                     "is required to obtain a web registry in order to"
                     "set the RememberMe cookie. Returning immediately "
                     "and ignoring RememberMe operation.")
              logger.debug(msg)
docs: 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