I have a program in Python that takes two strings is a plain text string, the second is a cipher key. Goes on each character and gives bits with cipher characters, but when going back and forth then some letters do not change properly. Bin string length 8DEP bitstrings (N): bin_string = bin (n) [2:] bin_string = ("0" * (8 - bin_string)) + bin_string returns bin_string // xors bits bit bit (x, B1, B1): Nb = "" x for the border (minimum), lane (b1)): nb + = "0" if b 0 [x] == b1 [x] and "1 "Return takes NB / 2 2 characters, turns them into bin string, does excerpts, then returns the new Charge Def Cipher Cher (C, C1): return chr (bit (bitstrings (ord (c0)) , BitString (ord (c1))), 2)) // takes s0 (plain text) and cipher Angy (S1) encrypts it using the Def cipher string (S, S1): Border (Lane (s)) in x for NS = "": ns + = cybercari (s [x], S1 [x% lanon (s1)] back ns
For example, sometimes in a long string, the word 'test' will be written back to 'east', and Content
I checked the code twelve times and I do not know whether to change the character, is it possible that some letters are amazing Behave in a manner?
Edit:
Example:
This is an exam because of some of the symbols in the previous exam:! @ # $% ^ & Amp; * () Does not change correctly I'm using EED
Cipher key: 'cipher key'
to return the translation:
This is a test because some signs in the previous mold:! @ # $% ^ & Amp; * () I am retestiig at the end I have not changed properly
Sorry, It's a bit messy, I keep it real quick together
"% S "For more details or example codes, you can go to your repository or even on github
In addition to this, I know that in this example the key is similar to the string If you want to use less string than string, try wrapping it in vigenere cipher (/ Vigenère_cipher)
No comments:
Post a Comment