update,
This commit is contained in:
43
banson_hker/deliver/diagram/decrypt_file.drawio
Normal file
43
banson_hker/deliver/diagram/decrypt_file.drawio
Normal file
@@ -0,0 +1,43 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="jUaFL9_61w-NF607VE0Q" name="Page-1">
|
||||
<mxGraphModel dx="1130" dy="797" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="6" style="edgeStyle=none;html=1;" parent="1" source="2" target="3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="Count letter occurence" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="240" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" style="edgeStyle=none;html=1;" parent="1" source="3" target="4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="find the letter with most occurence,<br>assign it to k" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="340" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="21" value="" style="edgeStyle=none;html=1;" parent="1" source="4" target="13" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="decrypt file using the guessed k" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="440" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="" style="edgeStyle=none;html=1;" parent="1" source="11" target="15" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="Start" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="60" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="End" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="540" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="" style="edgeStyle=none;html=1;" parent="1" source="15" target="2" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="Open file to read<br>(i.e. ./wiki_e.txt)" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="140" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
banson_hker/deliver/diagram/decrypt_file.png
(Stored with Git LFS)
Normal file
BIN
banson_hker/deliver/diagram/decrypt_file.png
(Stored with Git LFS)
Normal file
Binary file not shown.
104
banson_hker/deliver/diagram/decryption.drawio
Normal file
104
banson_hker/deliver/diagram/decryption.drawio
Normal file
@@ -0,0 +1,104 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="jUaFL9_61w-NF607VE0Q" name="Page-1">
|
||||
<mxGraphModel dx="2055" dy="1449" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="25" value="Yes" style="edgeStyle=none;html=1;" parent="1" source="21" target="24" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="39" value="No" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="21" target="38" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="570" y="310"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="21" value="Alphabat ?" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="320" y="270" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="27" value="" style="edgeStyle=none;html=1;" parent="1" source="24" target="26" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="24" value="Get offset according letter case<br><br>i.e.<br>capital letter "M" will use "A" as offset<br>small letter "m" will use "a" as offset" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="250" y="385" width="220" height="110" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="29" value="" style="edgeStyle=none;html=1;" parent="1" source="26" target="28" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="26" value="subtract letter ascii code (i.e. "M") <br>to offset selected above(i.e. "A")<br>&nbsp;<br>apply guessed k" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="250" y="530" width="220" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="31" value="" style="edgeStyle=none;html=1;" parent="1" source="28" target="30" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="28" value="wrap around if <br>less than 0 / more than 26 <br>by getting the remainder" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="250" y="650" width="220" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="33" value="" style="edgeStyle=none;html=1;" parent="1" source="30" target="32" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="30" value="get letter back after shifting" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="250" y="760" width="220" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="32" value="Append to decrypted message" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="300" y="850" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="34" value="End" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="300" y="1050" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="40" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="38" target="32" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="570" y="880"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="number will not encrypt, append directly" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="510" y="410" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="41" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="42" target="44">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="42" value="Start" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="20" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="43" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="44" target="46">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="44" value="loop through message by every letter" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="90" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="45" value="" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="46" target="21">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="360" y="250" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="46" value="get one character" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="180" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="47" value="" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" target="49" source="32">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="360" y="940" as="sourcePoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="48" value="Yes" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="49" target="34">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="400" y="1050" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="50" value="No" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="49" target="46">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="680" y="980"/>
|
||||
<mxPoint x="680" y="210"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="49" value="End of message ?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="320" y="940" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
banson_hker/deliver/diagram/decryption.png
(Stored with Git LFS)
Normal file
BIN
banson_hker/deliver/diagram/decryption.png
(Stored with Git LFS)
Normal file
Binary file not shown.
0
banson_hker/deliver/diagram/diagram1.drawio
Normal file
0
banson_hker/deliver/diagram/diagram1.drawio
Normal file
55
banson_hker/deliver/diagram/encrypt_file.drawio
Normal file
55
banson_hker/deliver/diagram/encrypt_file.drawio
Normal file
@@ -0,0 +1,55 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="jUaFL9_61w-NF607VE0Q" name="Page-1">
|
||||
<mxGraphModel dx="1329" dy="938" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="6" style="edgeStyle=none;html=1;" parent="1" source="2" target="3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="Generate file name according to user input<br>(i.e. ./wiki_e.txt)" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="259" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" style="edgeStyle=none;html=1;" parent="1" source="3" target="4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="open the file want to write&nbsp;<br>(i.e. ./wiki_e.txt)" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="363" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="19" value="" style="edgeStyle=none;html=1;" parent="1" source="4" target="18" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="clear file content" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="467" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="" style="edgeStyle=none;html=1;" parent="1" source="5" target="13" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="write the encrpted content" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="676" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="" style="edgeStyle=none;html=1;" parent="1" source="11" target="15" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="Start" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="60" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="End" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="790" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="" style="edgeStyle=none;html=1;" parent="1" source="15" target="2" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="Get content from user inputted file<br>(i.e. ./wiki.txt)" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="154" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="20" value="" style="edgeStyle=none;html=1;" parent="1" source="18" target="5" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="18" value="Generate encrypted content" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="571" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
banson_hker/deliver/diagram/encrypt_file.png
(Stored with Git LFS)
Normal file
BIN
banson_hker/deliver/diagram/encrypt_file.png
(Stored with Git LFS)
Normal file
Binary file not shown.
98
banson_hker/deliver/diagram/encryption.drawio
Normal file
98
banson_hker/deliver/diagram/encryption.drawio
Normal file
@@ -0,0 +1,98 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="jUaFL9_61w-NF607VE0Q" name="Page-1">
|
||||
<mxGraphModel dx="2260" dy="1594" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="16" value="" style="edgeStyle=none;html=1;" parent="1" source="11" target="15" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="Start" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="20" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="46" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="15" target="45">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="loop through message by every letter" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="90" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="25" value="Yes" style="edgeStyle=none;html=1;" parent="1" source="21" target="24" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="39" value="No" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="21" target="38" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="580" y="310"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="21" value="Alphabat ?" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="330" y="270" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="27" value="" style="edgeStyle=none;html=1;" parent="1" source="24" target="26" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="24" value="Get offset according letter case" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="390" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="29" value="" style="edgeStyle=none;html=1;" parent="1" source="26" target="28" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="26" value="get distance between from letter to "A" or "a"" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="490" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="31" value="" style="edgeStyle=none;html=1;" parent="1" source="28" target="30" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="28" value="wrap around if <br>less than 0 / more than 26 <br>by getting the modules<br><br>apply shifting" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="270" y="580" width="200" height="100" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="33" value="" style="edgeStyle=none;html=1;" parent="1" source="30" target="32" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="30" value="get letter back after shifting" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="710" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="42" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="32" target="41">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="32" value="append to encrypted message" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="810" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="34" value="End" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="1020" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="40" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="38" target="32" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="580" y="840"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="number will not encrypt, append directly" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="520" y="390" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="43" value="Yes" style="edgeStyle=none;html=1;" edge="1" parent="1" source="41" target="34">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="44" value="No" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="41" target="45">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="680" y="940"/>
|
||||
<mxPoint x="680" y="210"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="41" value="End of message ?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="330" y="900" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="47" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="45" target="21">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="45" value="get one character" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="310" y="180" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
banson_hker/deliver/diagram/encryption.png
(Stored with Git LFS)
Normal file
BIN
banson_hker/deliver/diagram/encryption.png
(Stored with Git LFS)
Normal file
Binary file not shown.
93
banson_hker/deliver/diagram/letter_statistics.drawio
Normal file
93
banson_hker/deliver/diagram/letter_statistics.drawio
Normal file
@@ -0,0 +1,93 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="jUaFL9_61w-NF607VE0Q" name="Page-1">
|
||||
<mxGraphModel dx="1883" dy="1328" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="25" value="Yes" style="edgeStyle=none;html=1;" parent="1" source="21" target="24" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="39" value="No" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="21" target="38" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="530" y="470"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="21" value="Alphabat ?" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="280" y="430" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="27" value="" style="edgeStyle=none;html=1;" parent="1" source="24" target="26" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="24" value="get the ascii code of all letter" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="260" y="570" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="29" value="" style="edgeStyle=none;html=1;" parent="1" source="26" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="320" y="810" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="26" value="add 1 to the value indexed by the letter above" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="260" y="680" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="56" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="38" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="320" y="810" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="530" y="770"/>
|
||||
<mxPoint x="320" y="770"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="number will not encrypt, skipping this step" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="470" y="590" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="43" value="" style="edgeStyle=none;html=1;" parent="1" target="21" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="319.9999999999998" y="380" as="sourcePoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="45" value="" style="edgeStyle=none;html=1;" parent="1" source="46" target="48" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="46" value="Start" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="260" y="70" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="47" value="" style="edgeStyle=none;html=1;" parent="1" source="48" target="49" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="48" value="setup a array of 26 to collect result<br>initialize them all to 0" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="260" y="130" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="60" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="49" target="59">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="49" value="loop through message by every letter" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="260" y="210" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="50" value="End" style="ellipse;whiteSpace=wrap;html=1;rounded=1;strokeColor=default;" parent="1" vertex="1">
|
||||
<mxGeometry x="260" y="940" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="54" value="Yes" style="edgeStyle=none;html=1;" parent="1" source="52" target="50" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="57" value="No" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="52" target="59">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="420" y="390" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="670" y="850"/>
|
||||
<mxPoint x="670" y="350"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="52" value="End of message ?" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="280" y="810" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="59" value="get one letter" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="260" y="320" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
banson_hker/deliver/diagram/letter_statistics.png
(Stored with Git LFS)
Normal file
BIN
banson_hker/deliver/diagram/letter_statistics.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user