[go: nahoru, domu]

ROT13: Difference between revisions

Content deleted Content added
GreenC bot (talk | contribs)
Rescued 6 archive links. Wayback Medic 2.5
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 10:
==Description==
Applying ROT13 to a piece of text merely requires examining its alphabetic characters and replacing each one by the letter 13 places further along in the [[alphabet]], wrapping back to the beginning if necessary.<ref name="schneier">{{Cite book|last=Schneier |first=Bruce |author-link= Bruce Schneier |title=Applied Cryptography |url=https://archive.org/details/appliedcryptogra00schn_605 |url-access=limited |edition=Second|year=1996|publisher=John Wiley & Sons |isbn= 0-471-11709-9|pages=[https://archive.org/details/appliedcryptogra00schn_605/page/n198 11] }}</ref>
<kbd>A</kbd> becomes <kbd>N</kbd>, <kbd>B</kbd> becomes <kbd>O</kbd>, and so on up to <kbd>M</kbd>, which becomes <kbd>Z</kbd>, then the sequence continues at the beginning of the alphabet: <kbd>N</kbd> becomes <kbd>A</kbd>, <kbd>O</kbd> becomes <kbd>B</kbd>, and so on to <kbd>Z</kbd>, which becomes <kbd>M</kbd>. Only those letters which occur in the [[English alphabet]] are affected; numbers, symbols, punctuation, whitespace, and all other characters are left unchanged. Because there are 26 letters in the English alphabet and 26 = 2 &times; 13, the ROT13 function is its own [[inverse function|inverse]]:<ref name="schneier"/>
 
:<math>\mbox{ROT}_{13}(\mbox{ROT}_{13}(x))=x</math> for any basic Latin-alphabet text ''x''.