Skip to content

Commit

Permalink
Update helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nkitan authored Dec 29, 2020
1 parent 1bd6b61 commit b33a644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/common/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def randomString(length=-1):
if length == -1:
length = random.randrange(6, 16)
random_string = ''.join(random.choice(string.ascii_letters) for x in range(length))
return random_string
return random_string.encode('utf-8')


def randomKey(b=32):
"""
Returns a random string/key of "b" characters in length, defaults to 32
"""
return ''.join(random.choice(string.ascii_letters + string.digits + "{}!@#$^&()*&[]|,./?") for x in range(b))
return ''.join(random.choice(string.ascii_letters + string.digits + "{}!@#$^&()*&[]|,./?") for x in range(b)).encode('utf-8')


def randomNumbers(b=7):
Expand Down

0 comments on commit b33a644

Please sign in to comment.