<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cmd_xor(k, i, o):
 """XOR cipher. Note: XOR is not a 'secure cipher'. If you need strong crypto you must use algorithms like AES. You can use habu.fernet for that. Example: \b $ habu.xor -k mysecretkey -i /bin/ls > xored $ habu.xor -k mysecretkey -i xored > uxored $ sha1sum /bin/ls uxored $ 6fcf930fcee1395a1c95f87dd38413e02deff4bb /bin/ls $ 6fcf930fcee1395a1c95f87dd38413e02deff4bb uxored """


    o.write(xor(i.read(), k.encode()))