-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unused function swap32 from utils.py
- Loading branch information
skelly
committed
Sep 3, 2024
1 parent
0aecc12
commit dd0d3fc
Showing
1 changed file
with
1 addition
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
import struct | ||
import random | ||
import string | ||
|
||
|
||
def swap32(i: int): | ||
"""Swap the endianess of a 32-bit integer""" | ||
return struct.unpack("<I", struct.pack(">I", i))[0] | ||
|
||
|
||
def random_string(n: int = 16, sample: str = string.ascii_lowercase + string.digits): | ||
"""Returns a random string using the characters defined in sample""" | ||
return "".join(random.choices(sample, k=n)) | ||
return "".join(random.choices(sample, k=n)) |