Skip to content
Snippets Groups Projects
Commit 2a6cc675 authored by Holger's avatar Holger
Browse files

Fix int

parent e872df16
Branches
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ class BrainKey(object): ...@@ -141,7 +141,7 @@ class BrainKey(object):
else: else:
num = int.from_bytes(urand, byteorder="little") num = int.from_bytes(urand, byteorder="little")
rndMult = num / 2 ** 16 # returns float between 0..1 (inclusive) rndMult = num / 2 ** 16 # returns float between 0..1 (inclusive)
wIdx = round(len(dict_lines) * rndMult) wIdx = int(round(len(dict_lines) * rndMult))
brainkey[j] = dict_lines[wIdx] brainkey[j] = dict_lines[wIdx]
return " ".join(brainkey).upper() return " ".join(brainkey).upper()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment