Generate a signature of the app assets by its algo name (and gar resources). Used to uniquely identify a app assets. Returns: str: signature of this assets
(self)
| 282 | |
| 283 | @property |
| 284 | def signature(self): |
| 285 | """Generate a signature of the app assets by its algo name (and gar resources). |
| 286 | |
| 287 | Used to uniquely identify a app assets. |
| 288 | |
| 289 | Returns: |
| 290 | str: signature of this assets |
| 291 | """ |
| 292 | s = hashlib.sha256() |
| 293 | s.update(self._algo.encode("utf-8", errors="ignore")) |
| 294 | if self._gar: |
| 295 | s.update(self._gar) |
| 296 | return s.hexdigest() |
| 297 | |
| 298 | def is_compatible(self, graph): |
| 299 | """Determine if this algorithm can run on this type of graph. |