[{"data":1,"prerenderedAt":326},["ShallowReactive",2],{"navigation_docs":3,"-ciphers-beaufort":124,"-ciphers-beaufort-surround":321},[4,36],{"title":5,"path":6,"stem":7,"children":8,"icon":35},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Encode and decode","\u002Fguide\u002Ftransform","1.guide\u002F02.transform",{"title":16,"path":17,"stem":18},"Analysis","\u002Fguide\u002Fanalysis","1.guide\u002F03.analysis",{"title":20,"path":21,"stem":22},"CLI","\u002Fguide\u002Fcli","1.guide\u002F04.cli",{"title":24,"path":25,"stem":26},"Agents","\u002Fguide\u002Fagents","1.guide\u002F05.agents",{"title":28,"path":29,"stem":30},"Custom ciphers","\u002Fguide\u002Fcustom","1.guide\u002F06.custom",{"title":32,"path":33,"stem":34},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F07.playground","i-solar-book-2-linear",{"title":37,"path":38,"stem":39,"children":40,"icon":123},"Ciphers","\u002Fciphers","2.ciphers\u002F00.index",[41,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119],{"title":42,"path":38,"stem":39},"Overview",{"title":44,"path":45,"stem":46},"Caesar","\u002Fciphers\u002Fcaesar","2.ciphers\u002F01.caesar",{"title":48,"path":49,"stem":50},"ROT-13","\u002Fciphers\u002Frot13","2.ciphers\u002F02.rot13",{"title":52,"path":53,"stem":54},"ROT-47","\u002Fciphers\u002Frot47","2.ciphers\u002F03.rot47",{"title":56,"path":57,"stem":58},"Atbash","\u002Fciphers\u002Fatbash","2.ciphers\u002F04.atbash",{"title":60,"path":61,"stem":62},"Affine","\u002Fciphers\u002Faffine","2.ciphers\u002F05.affine",{"title":64,"path":65,"stem":66},"Vigenère","\u002Fciphers\u002Fvigenere","2.ciphers\u002F06.vigenere",{"title":68,"path":69,"stem":70},"Trithemius","\u002Fciphers\u002Ftrithemius","2.ciphers\u002F07.trithemius",{"title":72,"path":73,"stem":74},"Alberti","\u002Fciphers\u002Falberti","2.ciphers\u002F08.alberti",{"title":76,"path":77,"stem":78},"Playfair","\u002Fciphers\u002Fplayfair","2.ciphers\u002F09.playfair",{"title":80,"path":81,"stem":82},"Polybius square","\u002Fciphers\u002Fpolybius","2.ciphers\u002F10.polybius",{"title":84,"path":85,"stem":86},"Morse code","\u002Fciphers\u002Fmorse","2.ciphers\u002F11.morse",{"title":88,"path":89,"stem":90},"Bacon's cipher","\u002Fciphers\u002Fbacon","2.ciphers\u002F12.bacon",{"title":92,"path":93,"stem":94},"Tap code","\u002Fciphers\u002Ftap-code","2.ciphers\u002F13.tap-code",{"title":96,"path":97,"stem":98},"ADFGVX","\u002Fciphers\u002Fadfgvx","2.ciphers\u002F14.adfgvx",{"title":100,"path":101,"stem":102},"Bifid","\u002Fciphers\u002Fbifid","2.ciphers\u002F15.bifid",{"title":104,"path":105,"stem":106},"Rail fence","\u002Fciphers\u002Frail-fence","2.ciphers\u002F16.rail-fence",{"title":108,"path":109,"stem":110},"Columnar transposition","\u002Fciphers\u002Fcolumnar","2.ciphers\u002F17.columnar",{"title":112,"path":113,"stem":114},"Enigma M3","\u002Fciphers\u002Fenigma","2.ciphers\u002F18.enigma",{"title":116,"path":117,"stem":118},"Beaufort","\u002Fciphers\u002Fbeaufort","2.ciphers\u002F19.beaufort",{"title":120,"path":121,"stem":122},"Autokey","\u002Fciphers\u002Fautokey","2.ciphers\u002F20.autokey","i-solar-library-linear",{"id":125,"title":116,"body":126,"description":314,"extension":315,"links":316,"meta":317,"navigation":318,"path":117,"seo":319,"stem":118,"__hash__":320},"docs\u002F2.ciphers\u002F19.beaufort.md",{"type":127,"value":128,"toc":312},"minimark",[129,133,142,267,292,302,308],[130,131],"cipher-facts",{"name":132},"beaufort",[134,135,136,137,141],"p",{},"Standard Beaufort uses ",[138,139,140],"code",{},"(key - input) mod 26",", with A = 0. Not variant Beaufort, which subtracts the key from the input. The distinction matters: encode and decode here do exactly the same transformation.",[143,144,149],"pre",{"className":145,"code":146,"language":147,"meta":148,"style":148},"language-ts shiki shiki-themes github-light github-light poimandres","const beaufort = create('beaufort')\nbeaufort.encode('DCODE', { key: 'KEY' }).text\nbeaufort.decode('HCKHA', { key: 'KEY' }).text\n","ts","",[138,150,151,187,232],{"__ignoreMap":148},[152,153,156,160,164,167,171,175,179,182,184],"span",{"class":154,"line":155},"line",1,[152,157,159],{"class":158},"s1TYA","const",[152,161,163],{"class":162},"saoiD"," beaufort",[152,165,166],{"class":158}," =",[152,168,170],{"class":169},"sULi6"," create",[152,172,174],{"class":173},"sKlNE","(",[152,176,178],{"class":177},"scVjq","'",[152,180,132],{"class":181},"sQ7BG",[152,183,178],{"class":177},[152,185,186],{"class":173},")\n",[152,188,190,193,196,199,201,203,206,208,211,215,218,221,224,226,229],{"class":154,"line":189},2,[152,191,132],{"class":192},"spVlQ",[152,194,195],{"class":173},".",[152,197,198],{"class":169},"encode",[152,200,174],{"class":173},[152,202,178],{"class":177},[152,204,205],{"class":181},"DCODE",[152,207,178],{"class":177},[152,209,210],{"class":173},", {",[152,212,214],{"class":213},"snHMy"," key",[152,216,217],{"class":173},":",[152,219,220],{"class":177}," '",[152,222,223],{"class":181},"KEY",[152,225,178],{"class":177},[152,227,228],{"class":173}," }).",[152,230,231],{"class":192},"text\n",[152,233,235,237,239,242,244,246,249,251,253,255,257,259,261,263,265],{"class":154,"line":234},3,[152,236,132],{"class":192},[152,238,195],{"class":173},[152,240,241],{"class":169},"decode",[152,243,174],{"class":173},[152,245,178],{"class":177},[152,247,248],{"class":181},"HCKHA",[152,250,178],{"class":177},[152,252,210],{"class":173},[152,254,214],{"class":213},[152,256,217],{"class":173},[152,258,220],{"class":177},[152,260,223],{"class":181},[152,262,178],{"class":177},[152,264,228],{"class":173},[152,266,231],{"class":192},[134,268,269,270,272,273,275,276,283,284,287,288,291],{},"The results are ",[138,271,248],{}," and ",[138,274,205],{},", matching the ",[277,278,282],"a",{"href":279,"rel":280},"https:\u002F\u002Fwww.dcode.fr\u002Fbeaufort-cipher",[281],"nofollow","published dCode vector",". Only ASCII letters advance the key. Spaces, punctuation and emoji pass through, and lowercase stays lowercase unless ",[138,285,286],{},"preserveCase"," is false. Set ",[138,289,290],{},"stripNonAlpha"," to remove everything outside A to Z before processing.",[134,293,294,295,298,299,195],{},"The key ignores case and characters outside ASCII letters. An absent or empty key raises ",[138,296,297],{},"MissingOptionError",". A key with no ASCII letters, or a value that is not a string, raises ",[138,300,301],{},"InvalidOptionError",[134,303,304,305,307],{},"Like ",[277,306,64],{"href":65},", a repeating key leaves a period to look for. Reciprocal doesn't mean secure.",[309,310,311],"style",{},"html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":148,"searchDepth":189,"depth":189,"links":313},[],"Subtract each letter from a repeating key. The same operation encodes and decodes.","md",null,{},true,{"title":116,"description":314},"2urNXMkug0U2ZrZMVekIvVcLKwcZMepUnOsa3w2QFpM",[322,324],{"title":112,"path":113,"stem":114,"description":323,"children":-1},"The Wehrmacht machine with rotors I, II, III and reflector B. Rotor positions, ring settings, a plugboard. Reciprocal, so one setting works both ways.",{"title":120,"path":121,"stem":122,"description":325,"children":-1},"A primer starts the key, then the plaintext takes over.",1789575597826]