(secret: Union[str, bytes], *parts: Union[str, bytes])
| 3808 | |
| 3809 | |
| 3810 | def _create_signature_v1(secret: Union[str, bytes], *parts: Union[str, bytes]) -> bytes: |
| 3811 | hash = hmac.new(utf8(secret), digestmod=hashlib.sha1) |
| 3812 | for part in parts: |
| 3813 | hash.update(utf8(part)) |
| 3814 | return utf8(hash.hexdigest()) |
| 3815 | |
| 3816 | |
| 3817 | def _create_signature_v2(secret: Union[str, bytes], s: bytes) -> bytes: |