I need a little help with the bytes();
function in Python 3.5.
I hope I understand this properly, but bytes are a different way of storing a value, like 52
is 110100
in binary. (Except binary is in bits right?) Anyway can somebody please tell me the following:
- The proper syntax of
bytes();
(In use of a string) - Proper arguments the parameter "encoding" in
bytes(str,encoding);
- If I am completely mis-using this concept please tell me.
NOTE:
I am using this for weak cryptographic purposes. Please tell me how to:
Add a constant to every byte
And how to reverse aforesaid process.
How I am Using It:
str = "MyString";
data = bytes(str,*WHAT GOES HERE*);
print(data);