(tag, data)
| 16 | from .util import modinv |
| 17 | |
| 18 | def TaggedHash(tag, data): |
| 19 | ss = hashlib.sha256(tag.encode('utf-8')).digest() |
| 20 | ss += ss |
| 21 | ss += data |
| 22 | return hashlib.sha256(ss).digest() |
| 23 | |
| 24 | def jacobi_symbol(n, k): |
| 25 | """Compute the Jacobi symbol of n modulo k |
no test coverage detected