(_v: str | bytes)
| 338 | |
| 339 | |
| 340 | def get_sha256_hash(_v: str | bytes): |
| 341 | sha256 = hashlib.sha256() |
| 342 | if isinstance(_v, str): |
| 343 | sha256.update(_v.encode()) |
| 344 | else: |
| 345 | sha256.update(_v) |
| 346 | return sha256.hexdigest() |
| 347 | |
| 348 | |
| 349 | ALLOWED_CLASSES = { |