Return a digest binary string computed from a sequence of numeric token ids.
(tokens)
| 42 | |
| 43 | |
| 44 | def tokens_hash(tokens): |
| 45 | """ |
| 46 | Return a digest binary string computed from a sequence of numeric token ids. |
| 47 | """ |
| 48 | as_bytes = array('h', tokens).tobytes() |
| 49 | return sha1(as_bytes).digest() |
| 50 | |
| 51 | |
| 52 | def index_hash(rule_tokens): |
no test coverage detected