Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/wheel/util.py @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 from __future__ import annotations | |
2 | |
3 import base64 | |
4 import logging | |
5 | |
6 log = logging.getLogger("wheel") | |
7 | |
8 | |
9 def urlsafe_b64encode(data: bytes) -> bytes: | |
10 """urlsafe_b64encode without padding""" | |
11 return base64.urlsafe_b64encode(data).rstrip(b"=") | |
12 | |
13 | |
14 def urlsafe_b64decode(data: bytes) -> bytes: | |
15 """urlsafe_b64decode without padding""" | |
16 pad = b"=" * (4 - (len(data) & 3)) | |
17 return base64.urlsafe_b64decode(data + pad) |