code: def encrypt(data, key):
      '''encrypt the data with the key'''
      data = __tobytes(data)
      data_len = len(data)
      data = ffi.from_buffer(data)
      key = ffi.from_buffer(__tobytes(key))
      out_len = ffi.new('size_t *')
      result = lib.xxtea_encrypt(data, data_len, key, out_len)
      ret = ffi.buffer(result, out_len[0])[:]
      lib.free(result)
      return ref encrypt(data, key):
      '''encrypt the data with the key'''
      data = __tobytes(data)
      data_len = len(data)
      data = ffi.from_buffer(data)
      key = ffi.from_buffer(__tobytes(key))
      out_len = ffi.new('size_t *')
      result = lib.xxtea_encrypt(data, data_len, key, out_len)
      ret = ffi.buffer(result, out_len[0])[:]
      lib.free(result)
      return ret
docs: encrypt the data with the key