Replies: 2 comments 2 replies
-
You can try this: >>> V = '0\xca\xfa\xd6A'
>>> B = bytes([ord(i) for i in V])
>>> V
'0\xca\xfa\xd6A'
>>> B
b'0\xca\xfa\xd6A'
>>> |
Beta Was this translation helpful? Give feedback.
0 replies
-
Wow, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good morning Forum,
I want to decrypt (AES encryption) a string e.g. '0\xca\xfa\xd6A\x89\xab ...'
Now I write this string into a variable VAR
To convert this string into blocks with a b in front of the string: VAR=b'0\xca\xfa\xd6A\x89\xab ...'
That works.
Now I have a string variable VAR='0\xca\xfa\xd6A\x89\xab ...' (without b in front)
I convert this VAR into blocks like this: VAR = bytes(VAR, 'utf-8')
I get the b in front of VAR, but now I get a double backslash instead of this single backslash in VAR
How is it possible to set this b sign in front of VAR with single backslash in VAR?
Thanks a lot for a tip
Klaus
Beta Was this translation helpful? Give feedback.
All reactions