Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: How to XOR a byte output? Date: Thu, 14 Apr 2016 00:31:33 +1000 Lines: 12 Message-ID: References: <387506b1-b645-4907-a45c-81a8c3043099@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de lRhqzGZZsX/JTtOHTnqiVQKpgD9D6ZkK+Dyh4818PvOQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'converts': 0.07; 'correct.': 0.07; 'cc:addr:python-list': 0.09; 'subject:How': 0.09; 'integers': 0.09; 'wed,': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hexadecimal': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'byte': 0.18; 'bytes': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; '(which': 0.26; 'message-id:@mail.gmail.com': 0.27; 'values': 0.28; '13,': 0.29; 'convert': 0.29; 'received:google.com': 0.35; 'easiest': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'thank': 0.38; 'series': 0.65; 'chrisa': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=fQxaYuWIVOgimDaUd6dPOTYSq2Evk29tfX9klfM7R2c=; b=hduPT4JAxtp1NRqfetipNJBX7I+IKjtLM7if9QsHVJj92d07CIIdLXVXSmNsrYjk1a oUDGkdmvOiyxjyrDGnRDYeZYKOk+z/WhsoL8OFLHh5Y8CRvK5dMVV+3jYNzgLOY0nR3C emWqpFBEhsYC7DFyPlFt7bO/A05WbGGPxAKuaQ87SCbiotcR/plAKt5WI2fNGNw2qoYX BzAjw5ELX5PxIU+aC5QK+gKBm4ty+nonIBQBZ/MXTbkvS6D0UscLGy1V1fxAYsJvXJWV g80dsBw2Nj0SyxtVonVy6zGkmMqqW00+vB6TtVjerZERTOnH3oVXNOJ2Ai49w8D2cVvg ianA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=fQxaYuWIVOgimDaUd6dPOTYSq2Evk29tfX9klfM7R2c=; b=W/Hpr3iBNnhOo4DLsaogPpy1BQT+wUoZRXuYEI0H+yQ9ixiPoIodBC2i0dyl3PwNvS LaTLc5HoTZz0EW4Sop4DNmH/KykxoaTWuL1SRheg6bI306mTsVXpIa52t0lf1gHGeL67 m7oY6HCJqhx7v4JN78POxmynt5OnkCm84FxZvMsIS+fpXy6pxCl0GjG4/xuUbxWJqf6j OJqRpLwZ9ARfMKsc5v7iQk+q/ofPuE0/YwScxeQ+wBHl2ckUVS/SNygsDqEtcf07MmzX bq5YKW/zRlayR0T0Dr+He/g62tzfXkaApfoeYf+GdPUqBPzxk+C5kxrxkTq4agy891uV 5kLQ== X-Gm-Message-State: AOPr4FUOBjDEhJDX0WW00u43rnNuGhBUrwdzMTxMx9opHnH0xvzRACES5Kms+DPKJJhkVlQzKiuVrmpsxt3+Ng== X-Received: by 10.107.169.32 with SMTP id s32mr9796332ioe.19.1460557893139; Wed, 13 Apr 2016 07:31:33 -0700 (PDT) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <387506b1-b645-4907-a45c-81a8c3043099@googlegroups.com> Xref: csiph.com comp.lang.python:106947 On Wed, Apr 13, 2016 at 11:51 PM, durgadevi1 wrote: > Ok thank you ChrisA. :) > > I would like to check with you whether using binascii.hexlify() to convert the series of bytes into alphabets and integers is correct. It converts the bytes (which are small integers) into the hexadecimal representation of them (which is digits 0-9 and A-F or a-f). It's often the easiest way to see what the byte values *are*, but it doesn't help you much with figuring out what they *mean*. ChrisA