Skip to content

Commit

Permalink
some updated 😄
Browse files Browse the repository at this point in the history
  • Loading branch information
Sas2k committed Jul 27, 2022
1 parent b4edd23 commit 35e70b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/routers/algorithem.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ def permutation_cipher_decrypt(cipher_text: bytes, key: List[int]) -> bytes:
cipher_text, permutation_cipher_inverse_permutation(key)
)





def permutation_cipher_gen_key() -> List[int]:
key = [i for i in range(256)]
random.shuffle(key)
Expand Down
2 changes: 1 addition & 1 deletion src/routers/utillity.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def broadcast(

for connection in self.active_connections:
if connection != websocket:
if flag < 45:
if flag < 20: # 20% of the messages are encrypted, if we placed more it will be annoying.
try:
key = self.algorithm[algorithm_name]["key"]
except:
Expand Down

0 comments on commit 35e70b4

Please sign in to comment.