Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106987
| Path | csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Marko Rauhamaa <marko@pacujo.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: How to XOR a byte output? |
| Date | Thu, 14 Apr 2016 12:18:16 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 18 |
| Message-ID | <87potssg4n.fsf@elektro.pacujo.net> (permalink) |
| References | <387506b1-b645-4907-a45c-81a8c3043099@googlegroups.com> <CAPTjJmpuG=ew7FPwhdtsgDyjDc8d_T8-zbWuVxZy_sUUGj+R0Q@mail.gmail.com> <mailman.71.1460554158.15650.python-list@python.org> <874mb5twha.fsf@elektro.pacujo.net> <2566ab7f-12bd-4f3b-92b2-45104b8b7dd8@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="5486"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Xjz4dnPIHCYBrZ2dOsD2E" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
| Cancel-Lock | sha1:FvZ7OL1Zn1e7nLf01VsUF3md54I= sha1:zwyKw/6Y+8Z0HCTwewMprF9x+WM= |
| Xref | csiph.com comp.lang.python:106987 |
Show key headers only | View raw
durgadevi1 <srirajarajeswaridevikrupa@gmail.com>: >> >>> bytes(c ^ k for c, k in zip(code, key)).decode() > > [...] > UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 0: > invalid start byte > > [...] > > However, I get no errors when using values 0 to 127 to XOR with CODE. > But I get errors when using values (128 to 255). May I know how I can > modify the program code so that i can XOR with values (128 to 255)? Leave out .decode() at the end. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-13 06:18 -0700
Re: How to XOR a byte output? Chris Angelico <rosuav@gmail.com> - 2016-04-13 23:29 +1000
Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-13 06:51 -0700
Re: How to XOR a byte output? Chris Angelico <rosuav@gmail.com> - 2016-04-14 00:31 +1000
Re: How to XOR a byte output? Stephen Hansen <me+python@ixokai.io> - 2016-04-13 08:33 -0700
Re: How to XOR a byte output? Marko Rauhamaa <marko@pacujo.net> - 2016-04-13 17:27 +0300
Re: How to XOR a byte output? Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-13 09:30 -0600
Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-14 01:49 -0700
Re: How to XOR a byte output? Peter Otten <__peter__@web.de> - 2016-04-14 11:16 +0200
Re: How to XOR a byte output? Marko Rauhamaa <marko@pacujo.net> - 2016-04-14 12:18 +0300
Re: How to XOR a byte output? Chris Juried <cjuried@yahoo.com> - 2016-04-14 23:05 +0000
Re: How to XOR a byte output? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-15 08:06 -0400
Re: How to XOR a byte output? alister <alister.ware@ntlworld.com> - 2016-04-13 16:15 +0000
[OT] A doubt about a doubt, was Re: How to XOR a byte output? Peter Otten <__peter__@web.de> - 2016-04-13 18:59 +0200
Re: [OT] A doubt about a doubt, was Re: How to XOR a byte output? Rustom Mody <rustompmody@gmail.com> - 2016-04-13 18:54 -0700
Re: [OT] A doubt about a doubt Peter Otten <__peter__@web.de> - 2016-04-14 14:26 +0200
Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-14 01:32 -0700
Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-15 04:46 -0700
csiph-web