code: def encrypt(self, value):
          
          timestamp = str(int(time.time()))
          value = base64.b64encode(value.encode(self.encoding))
          signature = create_signature(self.secret, value + timestamp.encode(),
                                       encoding=self.encoding)
          return "|".join([value.decode(self.encoding), timestamp, signature])
docs: Encrypt session data.