Skip to content

Commit

Permalink
Removed unused function swap32 from utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
skelly committed Sep 3, 2024
1 parent 0aecc12 commit dd0d3fc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/server/utils.py
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))

0 comments on commit dd0d3fc

Please sign in to comment.