Files
004_comission/banson_hker/deliver/diagram/encryption.drawio
louiscklaw 72bacdd6b5 update,
2025-01-31 19:28:21 +08:00

99 lines
6.6 KiB
Plaintext

<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 &quot;A&quot; or &quot;a&quot;" 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 &lt;br&gt;less than 0 / more than 26 &lt;br&gt;by getting the modules&lt;br&gt;&lt;br&gt;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>