I'm making a chatting app(for fun) and I have been encountering an issue, where no matter how hard I try, I cannot get decrypting to work. I have this client code: https://pastebin.com/g9eeipKd and this server code: https://pastebin.com/pZzp145y. Logs: Client1 Server IP: 192.168.0.200 [*] Connected to server Enter your username: 1 first_device Set encryption password: ello <class 'bytes'> b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z' bytearray(b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z') bytearray(b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z') (1) > Hello Hello โ unencrypted text
bytearray(b'y>\n8D') ``` โencrypted text
bytearray(b'1[fT+j_ueso/3cn|C+<elloR`,ZuWP0Nh9DMzMS%4z')``` โ Encryption key
(1) >``` Client 2: ```Server IP: 192.168.0.200
[*] Connected to server
Enter your username: 2
not_first_device
db
<class 'bytes'>
b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z'
bytearray(b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z')
bytearray(b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z')
(2) >
Received encrypted data: b" b'y>\\n8D'"
key: bytearray(b'1[fT+j_ueso/3cn|C+<*elloR`,ZuWP0Nh9DMzMS*%4z')
Decrypted data: 9A-61M!T
1:: 9A-61M!T``` โ"decrypted" message with username (<username>: <message>)
(2) > server: [] Listening on 192.168.0.200:9988
[] Accepted connection from ('192.168.0.200', 58660)
1[fT+j_ueso/3cn|C+<elloR`,ZuWP0Nh9DMzMS%4z โencryption key
<class 'bytearray'>
bytearray(b'1[fT+j_ueso/3cn|C+<elloR`,ZuWP0Nh9DMzMS%4z')
bytearray(b'1[fT+j_ueso/3cn|C+<elloR`,ZuWP0Nh9DMzMS%4z')
[*] Accepted connection from ('192.168.0.200', 58671)
b'y>\n8D'
1: b'y>\n8D' โencrypted text
pls help
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.