Return a computed unique id string based on this rule content. This is used to compute unique identifiers for synthetic rules. (This is a SHA1 checksum of the expression and text, but this is an implementation detail)
(self)
| 2720 | |
| 2721 | @property |
| 2722 | def _unique_id(self): |
| 2723 | """ |
| 2724 | Return a computed unique id string based on this rule content. |
| 2725 | |
| 2726 | This is used to compute unique identifiers for synthetic rules. |
| 2727 | (This is a SHA1 checksum of the expression and text, but this is an |
| 2728 | implementation detail) |
| 2729 | """ |
| 2730 | content = f'{self.license_expression!r}{self.text!r}' |
| 2731 | return sha1(content.encode('utf-8')).hexdigest() |
| 2732 | |
| 2733 | def load(self): |
| 2734 | raise NotImplementedError |