encryption - Bitshift Encrypt and Decrypt with Circular shift in Python -


Edit: I understood it. Here's the code I used.

  def bitshiftEncrypt (word): newWord = "" for the word: shift = '{: 07b}'. Format (ord (i) +1) NewShift = shift [0] newShift + = shift [0] newWord + = chr (int (newshift, 2)) print (newworld) def bitsoft decrypt (word): newWord = "i" In the word: shift = ': 07b}' Format (ord (i)) newShift = shift [len (str (shift) - 1] newShift + = shift [: - 1: 1] New word + = str (chr (int (newshift, 2) -   

P> bin () Possible representation will give you screw in different ways.

  3> gt;> Bin (3) '0b11' 3> '{: 07b}' Format (3) '0000011'    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -