{"id":434,"date":"2011-04-04T05:11:09","date_gmt":"2011-04-04T05:11:09","guid":{"rendered":"http:\/\/blog.elkom08.x10.bz\/?p=49"},"modified":"2026-11-14T22:08:07","modified_gmt":"2026-11-14T14:08:07","slug":"implementasi-cipher-dengan-php","status":"publish","type":"post","link":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/","title":{"rendered":"Implementasi cipher dengan PHP"},"content":{"rendered":"<p>Kemarin kebetulan belajar keamanan informasi tentang enkripsi, dan di ajarkan beberapa enkripsi yaitu caesar cipher dan vigenere cipher. tiba tiba terfikir ingin mencoba membuat cipher dengan PHP, berhubung saya sedang menggemari bahasa tersebut. ya alhamdulillah setelah beberapa hari akhirnya jadi juga \ud83d\ude00<\/p>\n<p>untuk menjelaskan programnya satu persatu, mungkin akan memakan banyak waktu, jadi saya cuma copas listing programnya saja, untuk penjelasan mengenail syntaxnya banyak sekali di temukan di <a href=\"http:\/\/google.com\" target=\"_self\">Google<\/a> atau di <a href=\"http:\/\/w3schools.com\" target=\"_self\">W3schools<\/a>.<\/p>\n<p>yang pertama buat file untuk convertnya, beri nama <strong>convert.php<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-php\" data-file=\"convert.php\" data-lang=\"PHP\"><code>&lt;?php\n\/*\n *      convert.php\n *      \n *      Copyright 2011 Ahmad Zafrullah Mardiansyah &lt;zaf@zaf-laptop&gt;\n *      \n *      This program is free software; you can redistribute it and\/or modify\n *      it under the terms of the GNU General Public License as published by\n *      the Free Software Foundation; either version 2 of the License, or\n *      (at your option) any later version.\n *      \n *      This program is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *      GNU General Public License for more details.\n *      \n *      You should have received a copy of the GNU General Public License\n *      along with this program; if not, write to the Free Software\n *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n *      MA 02110-1301, USA.\n *\/\n \nfunction char_to_dec($a){\n    $i=ord($a);\n    if ($i&gt;=97 &amp;&amp; $i&lt;=122){\n        return ($i-96);\n    } else if ($i&gt;=65 &amp;&amp; $i&lt;=90){\n        return ($i-38);\n    } else {\n        return null;\n    }\n}\n\nfunction dec_to_char($a){\n    if ($a&gt;=1 &amp;&amp; $a&lt;=26){\n        return (chr($a+96));\n    } else if ($a&gt;=27 &amp;&amp; $a&lt;=52){\n        return (chr($a+38));\n    } else {\n        return null;\n    }\n}\n\nfunction tabel_vigenere_encrypt($a, $b){\n    $i=$a+$b-1;\n    if ($i&gt;26){\n        $i=$i-26;\n    }\n    return (dec_to_char($i));\n}\nfunction tabel_vigenere_decrypt($a, $b){\n    $i=$a-$b+1;\n    if ($i&lt;1){\n        $i=$i+26;\n    }\n    return (dec_to_char($i));\n}\n\n?&gt;<\/code><\/pre>\n<\/div>\n<p><!--more--><br \/>\nkemudian untuk  <strong>index.php<\/strong> nya<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-php\" data-file=\"index.php\" data-lang=\"PHP\"><code>&lt;?php\n\/*\n *      index.php\n *      \n *      Copyright 2011 Ahmad Zafrullah Mardiansyah &lt;zaf@zaf-laptop&gt;\n *      \n *      This program is free software; you can redistribute it and\/or modify\n *      it under the terms of the GNU General Public License as published by\n *      the Free Software Foundation; either version 2 of the License, or\n *      (at your option) any later version.\n *      \n *      This program is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *      GNU General Public License for more details.\n *      \n *      You should have received a copy of the GNU General Public License\n *      along with this program; if not, write to the Free Software\n *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n *      MA 02110-1301, USA.\n *\/\n \ninclude &quot;convert.php&quot;;\n\n?&gt;\n\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN&quot;\n  &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd&quot;&gt;\n&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;\n\n&lt;head&gt;\n    &lt;title&gt;cipher | 23Pstars&lt;\/title&gt;\n    &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text\/html;charset=utf-8&quot; \/&gt;\n    &lt;meta name=&quot;generator&quot; content=&quot;Geany 0.18&quot; \/&gt;\n    &lt;style type=&quot;text\/css&quot;&gt;\n    a:link {color: #000000; text-decoration: none}\n    a:visited {color: #000000; text-decoration: none}\n    a:hover {color: #FF0000; text-decoration: underline}\n    &lt;\/style&gt;\n    &lt;script type=&quot;text\/javascript&quot;&gt;\n    function SelectAll(id){\n        document.getElementById(id).focus();\n        document.getElementById(id).select();\n    }\n    function Info(){\n        alert(&quot;Original code by :&quot;+'&#092;n&#092;n'+&quot;Ahmad Zafrullah Mardiansyah&quot;);\n    }\n    function InfoCaesar(){\n        alert(&quot;Key hanya berupa kombinasi angka,&quot;+'&#092;n'+&quot;dan plan text tidak boleh mengandung angka!&quot;);\n    }\n    function InfoVigenere(){\n        alert(&quot;Key hanya berupa kombinasi kata, tidak boleh mengandung angka,&quot;+'&#092;n'+&quot;dan plan text tidak boleh mengandung angka!&quot;);\n    }\n    &lt;\/script&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n    &lt;center&gt;\n    &lt;h2&gt;Simple cipher implementation with PHP&lt;\/h2&gt;\n    &lt;h4&gt;&lt;a onclick=&quot;Info()&quot;&gt;by 23Pstars&lt;\/a&gt;&lt;\/h4&gt;\n    &lt;\/center&gt;\n    &lt;table width=&quot;600&quot; align=&quot;center&quot;&gt;\n    &lt;tr&gt;&lt;td width=&quot;50%&quot; valign=&quot;top&quot;&gt;\n    &lt;fieldset&gt;\n    &lt;legend&gt;&lt;b&gt;Caesar&lt;\/b&gt;&lt;\/legend&gt;\n    &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;\n    &lt;input type=&quot;text&quot; name=&quot;key_caesar&quot; id=&quot;key_caesar&quot; value=&quot;the key...&quot; onclick=&quot;SelectAll('key_caesar')&quot; \/&gt;\n    &lt;input type=&quot;submit&quot; value=&quot;?&quot; onclick=&quot;InfoCaesar()&quot; \/&gt;&lt;br\/&gt;\n    &lt;textarea rows=&quot;4&quot; name=&quot;plantext_caesar&quot; id=&quot;plantext_caesar&quot; cols=&quot;33&quot; onclick=&quot;SelectAll('plantext_caesar')&quot; &gt;plan text...&lt;\/textarea&gt;&lt;br\/&gt;\n    &lt;input type=&quot;submit&quot; name=&quot;encrypt_caesar&quot; value=&quot;Encrypt&quot; \/&gt;&lt;input type=&quot;submit&quot; name=&quot;decrypt_caesar&quot; value=&quot;Decrypt&quot; \/&gt;&lt;input type=&quot;reset&quot; value=&quot;Reset&quot; \/&gt;\n    &lt;\/form&gt;\n    &lt;\/fieldset&gt;\n    &lt;\/td&gt;&lt;td valign=&quot;top&quot; colspan=&quot;3&quot;&gt;\n    &lt;fieldset&gt;\n    &lt;legend&gt;&lt;b&gt;Result&lt;\/b&gt;&lt;\/legend&gt;\n    &lt;?php\n    \/\/----------------------------------------------------------------\/\/\n    \/\/ caesar                                                         \/\/\n    \/\/----------------------------------------------------------------\/\/\n        if((isset($_POST['key_caesar'])) &amp;&amp; (isset($_POST['plantext_caesar'])) &amp;&amp; isset($_POST['encrypt_caesar'])){\n            $key=$_POST['key_caesar'];\n            $plantext=$_POST['plantext_caesar'];\n            $split_key=str_split($key);\n            $i=0;\n            $split_chr=str_split($plantext);\n            while ($key&gt;52){\n                $key=$key-52;\n            }\n            foreach($split_chr as $chr){\n                if (char_to_dec($chr)!=null){\n                    $split_nmbr[$i]=char_to_dec($chr);\n                } else {\n                    $split_nmbr[$i]=$chr;\n                }\n                $i++;\n            }\n            echo '&lt;textarea rows=&quot;4&quot; id=&quot;result&quot; cols=&quot;33&quot; onclick=&quot;SelectAll(&#092;'result&#092;')&quot; &gt;';\n            foreach($split_nmbr as $nmbr){\n                if (($nmbr+$key)&gt;52){\n                    if (dec_to_char($nmbr)!=null){\n                        echo dec_to_char(($nmbr+$key)-52);\n                    } else {\n                        echo $nmbr;\n                    }\n                } else {\n                    if (dec_to_char($nmbr)!=null){\n                        echo dec_to_char($nmbr+$key);\n                    } else {\n                        echo $nmbr;\n                    }\n                }\n            }\n            echo '&lt;\/textarea&gt;&lt;br\/&gt;';\n        } else if ((isset($_POST['key_caesar'])) &amp;&amp; (isset($_POST['plantext_caesar'])) &amp;&amp; isset($_POST['decrypt_caesar'])){\n            $key=$_POST['key_caesar'];\n            $plantext=$_POST['plantext_caesar'];\n            $i=0;\n            $split_chr=str_split($plantext);\n            while ($key&gt;52){\n                $key=$key-52;\n            }\n            foreach($split_chr as $chr){\n                if (char_to_dec($chr)!=null){\n                    $split_nmbr[$i]=char_to_dec($chr);\n                } else {\n                    $split_nmbr[$i]=$chr;\n                }\n                $i++;\n            }\n            echo '&lt;textarea rows=&quot;4&quot; id=&quot;result&quot; cols=&quot;33&quot; onclick=&quot;SelectAll(&#092;'result&#092;')&quot; &gt;';\n            foreach($split_nmbr as $nmbr){\n                if (($nmbr-$key)&lt;1){\n                    if (dec_to_char($nmbr)!=null){\n                        echo dec_to_char(($nmbr-$key)+52);\n                    } else {\n                        echo $nmbr;\n                    }\n                } else {\n                    if (dec_to_char($nmbr)!=null){\n                        echo dec_to_char($nmbr-$key);\n                    } else {\n                        echo $nmbr;\n                    }\n                }\n            }\n            echo '&lt;\/textarea&gt;&lt;br\/&gt;';\n            \n    \/\/----------------------------------------------------------------\/\/\n    \/\/ vigenere                                                       \/\/\n    \/\/----------------------------------------------------------------\/\/\n        } else if ((isset($_POST['key_vigenere'])) &amp;&amp; (isset($_POST['plantext_vigenere'])) &amp;&amp; (isset($_POST['encrypt_vigenere']))){\n            $key=$_POST['key_vigenere'];\n            $plantext=$_POST['plantext_vigenere'];\n            $len_key=strlen($key);\n            $len_plantext=strlen($plantext);\n            $split_key=str_split($key);\n            $split_plantext=str_split($plantext);\n            \n            echo '&lt;textarea rows=&quot;4&quot; id=&quot;result&quot; cols=&quot;33&quot; onclick=&quot;SelectAll(&#092;'result&#092;')&quot; &gt;';\n            $i=0;\n            for($j=0;$j&lt;$len_plantext;$j++){\n                if ($i==$len_key){\n                    $i=0;\n                }\n                $split_key2[$j]=$split_key[$i];\n                $i++;\n            }\n            for($k=0;$k&lt;$len_plantext;$k++){\n                $a=char_to_dec($split_key2[$k]);\n                $b=char_to_dec($split_plantext[$k]);\n                if (($a &amp;&amp; $b)!=null){\n                    echo (tabel_vigenere_encrypt($a, $b));\n                } else {\n                    echo $split_plantext[$k];\n                }\n            }\n            echo '&lt;\/textarea&gt;&lt;br\/&gt;';\n        } else if ((isset($_POST['key_vigenere'])) &amp;&amp; (isset($_POST['plantext_vigenere'])) &amp;&amp; (isset($_POST['decrypt_vigenere']))){\n            $key=$_POST['key_vigenere'];\n            $plantext=$_POST['plantext_vigenere'];\n            $len_key=strlen($key);\n            $len_plantext=strlen($plantext);\n            $split_key=str_split($key);\n            $split_plantext=str_split($plantext);\n            \n            echo '&lt;textarea rows=&quot;4&quot; id=&quot;result&quot; cols=&quot;33&quot; onclick=&quot;SelectAll(&#092;'result&#092;')&quot; &gt;';\n            $i=0;\n            for($j=0;$j&lt;$len_plantext;$j++){\n                if ($i==$len_key){\n                    $i=0;\n                }\n                $split_key2[$j]=$split_key[$i];\n                $i++;\n            }\n            \n            for($k=0;$k&lt;$len_plantext;$k++){\n                $a=char_to_dec($split_key2[$k]);\n                $b=char_to_dec($split_plantext[$k]);\n                if (($a &amp;&amp; $b)!=null){\n                    echo (tabel_vigenere_decrypt($b, $a));\n                } else {\n                    echo $split_plantext[$k];\n                }\n            }\n            \n            echo '&lt;\/textarea&gt;&lt;br\/&gt;';\n\n        } else {\n            echo &quot;result here...&quot;;\n        }\n    ?&gt;\n    &lt;\/fieldset&gt;\n    &lt;\/td&gt;&lt;\/tr&gt;\n    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;\n    &lt;fieldset&gt;\n    &lt;legend&gt;&lt;b&gt;Vigenere&lt;\/b&gt;&lt;\/legend&gt;\n    &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;\n    &lt;input type=&quot;text&quot; name=&quot;key_vigenere&quot; id=&quot;key_vigenere&quot; value=&quot;the key...&quot; onclick=&quot;SelectAll('key_vigenere')&quot; \/&gt;\n    &lt;input type=&quot;submit&quot; value=&quot;?&quot; onclick=&quot;InfoVigenere()&quot; \/&gt;&lt;br\/&gt;\n    &lt;textarea rows=&quot;4&quot; name=&quot;plantext_vigenere&quot; id=&quot;plantext_vigenere&quot; cols=&quot;33&quot; onclick=&quot;SelectAll('plantext_vigenere')&quot; &gt;plan text...&lt;\/textarea&gt;&lt;br\/&gt;\n    &lt;input type=&quot;submit&quot; name=&quot;encrypt_vigenere&quot; value=&quot;Encrypt&quot; \/&gt;&lt;input type=&quot;submit&quot; name=&quot;decrypt_vigenere&quot; value=&quot;Decrypt&quot; \/&gt;&lt;input type=&quot;reset&quot; value=&quot;Reset&quot; \/&gt;\n    &lt;\/form&gt;\n    &lt;\/fieldset&gt;\n    &lt;\/td&gt;&lt;\/tr&gt;\n    &lt;!-- masih dalam pengerjaan :p\n    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;\n    &lt;fieldset&gt;\n    &lt;legend&gt;&lt;b&gt;Playfair&lt;\/b&gt;&lt;\/legend&gt;\n    &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;\n    &lt;input type=&quot;text&quot; name=&quot;key_playfair&quot; id=&quot;key_playfair&quot; value=&quot;the key...&quot; onclick=&quot;SelectAll('key_playfair')&quot; \/&gt;&lt;br\/&gt;\n    &lt;textarea rows=&quot;4&quot; name=&quot;plantext_playfair&quot; id=&quot;plantext_playfair&quot; cols=&quot;33&quot; onclick=&quot;SelectAll('plantext_playfair')&quot; &gt;plan text...&lt;\/textarea&gt;&lt;br\/&gt;\n    &lt;input type=&quot;submit&quot; name=&quot;encrypt_playfair&quot; value=&quot;Encrypt&quot; \/&gt;&lt;input type=&quot;submit&quot; name=&quot;Decrypt_playfair&quot; value=&quot;Decrypt&quot; \/&gt;&lt;input type=&quot;reset&quot; value=&quot;Reset&quot; \/&gt;\n    &lt;\/form&gt;\n    &lt;\/fieldset&gt;\n    &lt;\/td&gt;&lt;\/tr&gt;\n    --&gt;\n    &lt;\/table&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<\/div>\n<p>kemudian untuk hasil jadinya bisa di lihat di <a href=\"http:\/\/zaf.web.id\/labs\/cipher\">http:\/\/zaf.web.id\/labs\/cipher<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kemarin kebetulan belajar keamanan informasi tentang enkripsi, dan di ajarkan beberapa enkripsi yaitu caesar cipher&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[57],"tags":[89,90,100,82,111],"class_list":["post-434","post","type-post","status-publish","format-standard","hentry","category-programming","tag-caesar","tag-cipher","tag-keamanan-informasi","tag-php","tag-vigenere"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Implementasi cipher dengan PHP - Ahmad Zafrullah<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/\" \/>\n<meta property=\"og:locale\" content=\"id_ID\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implementasi cipher dengan PHP - Ahmad Zafrullah\" \/>\n<meta property=\"og:description\" content=\"Kemarin kebetulan belajar keamanan informasi tentang enkripsi, dan di ajarkan beberapa enkripsi yaitu caesar cipher&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Ahmad Zafrullah\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/23Pstars\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/23Pstars\" \/>\n<meta property=\"article:published_time\" content=\"2011-04-04T05:11:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-14T14:08:07+00:00\" \/>\n<meta name=\"author\" content=\"Zaf\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@23Pstars\" \/>\n<meta name=\"twitter:site\" content=\"@23Pstars\" \/>\n<meta name=\"twitter:label1\" content=\"Ditulis oleh\" \/>\n\t<meta name=\"twitter:data1\" content=\"Zaf\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimasi waktu membaca\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 menit\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/\"},\"author\":{\"name\":\"Zaf\",\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/#\\\/schema\\\/person\\\/ba4e955d59a1e6a8284857e74b14e5ed\"},\"headline\":\"Implementasi cipher dengan PHP\",\"datePublished\":\"2011-04-04T05:11:09+00:00\",\"dateModified\":\"2026-11-14T14:08:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/\"},\"wordCount\":106,\"commentCount\":23,\"publisher\":{\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/#\\\/schema\\\/person\\\/ba4e955d59a1e6a8284857e74b14e5ed\"},\"keywords\":[\"caesar\",\"cipher\",\"keamanan informasi\",\"php\",\"vigenere\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"id\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/\",\"url\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/\",\"name\":\"Implementasi cipher dengan PHP - Ahmad Zafrullah\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/#website\"},\"datePublished\":\"2011-04-04T05:11:09+00:00\",\"dateModified\":\"2026-11-14T14:08:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/#breadcrumb\"},\"inLanguage\":\"id\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/implementasi-cipher-dengan-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implementasi cipher dengan PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/\",\"name\":\"Ahmad Zafrullah\",\"description\":\"Work to Learn is better than Learn how to Work\",\"publisher\":{\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/#\\\/schema\\\/person\\\/ba4e955d59a1e6a8284857e74b14e5ed\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"id\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/#\\\/schema\\\/person\\\/ba4e955d59a1e6a8284857e74b14e5ed\",\"name\":\"Zaf\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/zaf.web.id\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/zaf.web.id\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/zaf.web.id\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1\",\"width\":300,\"height\":300,\"caption\":\"Zaf\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/zaf.web.id\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1\"},\"sameAs\":[\"http:\\\/\\\/zaf.web.id\",\"http:\\\/\\\/www.facebook.com\\\/23Pstars\",\"https:\\\/\\\/x.com\\\/23Pstars\"],\"url\":\"https:\\\/\\\/zaf.web.id\\\/blog\\\/author\\\/zaf\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implementasi cipher dengan PHP - Ahmad Zafrullah","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/","og_locale":"id_ID","og_type":"article","og_title":"Implementasi cipher dengan PHP - Ahmad Zafrullah","og_description":"Kemarin kebetulan belajar keamanan informasi tentang enkripsi, dan di ajarkan beberapa enkripsi yaitu caesar cipher&hellip;","og_url":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/","og_site_name":"Ahmad Zafrullah","article_publisher":"http:\/\/www.facebook.com\/23Pstars","article_author":"http:\/\/www.facebook.com\/23Pstars","article_published_time":"2011-04-04T05:11:09+00:00","article_modified_time":"2026-11-14T14:08:07+00:00","author":"Zaf","twitter_card":"summary_large_image","twitter_creator":"@23Pstars","twitter_site":"@23Pstars","twitter_misc":{"Ditulis oleh":"Zaf","Estimasi waktu membaca":"9 menit"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/#article","isPartOf":{"@id":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/"},"author":{"name":"Zaf","@id":"https:\/\/zaf.web.id\/blog\/#\/schema\/person\/ba4e955d59a1e6a8284857e74b14e5ed"},"headline":"Implementasi cipher dengan PHP","datePublished":"2011-04-04T05:11:09+00:00","dateModified":"2026-11-14T14:08:07+00:00","mainEntityOfPage":{"@id":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/"},"wordCount":106,"commentCount":23,"publisher":{"@id":"https:\/\/zaf.web.id\/blog\/#\/schema\/person\/ba4e955d59a1e6a8284857e74b14e5ed"},"keywords":["caesar","cipher","keamanan informasi","php","vigenere"],"articleSection":["Programming"],"inLanguage":"id","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/","url":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/","name":"Implementasi cipher dengan PHP - Ahmad Zafrullah","isPartOf":{"@id":"https:\/\/zaf.web.id\/blog\/#website"},"datePublished":"2011-04-04T05:11:09+00:00","dateModified":"2026-11-14T14:08:07+00:00","breadcrumb":{"@id":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/#breadcrumb"},"inLanguage":"id","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zaf.web.id\/blog\/implementasi-cipher-dengan-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zaf.web.id\/blog\/"},{"@type":"ListItem","position":2,"name":"Implementasi cipher dengan PHP"}]},{"@type":"WebSite","@id":"https:\/\/zaf.web.id\/blog\/#website","url":"https:\/\/zaf.web.id\/blog\/","name":"Ahmad Zafrullah","description":"Work to Learn is better than Learn how to Work","publisher":{"@id":"https:\/\/zaf.web.id\/blog\/#\/schema\/person\/ba4e955d59a1e6a8284857e74b14e5ed"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zaf.web.id\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"id"},{"@type":["Person","Organization"],"@id":"https:\/\/zaf.web.id\/blog\/#\/schema\/person\/ba4e955d59a1e6a8284857e74b14e5ed","name":"Zaf","image":{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2024\/09\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1","url":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2024\/09\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1","contentUrl":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2024\/09\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1","width":300,"height":300,"caption":"Zaf"},"logo":{"@id":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2024\/09\/zaf_auto_x2.jpeg?fit=300%2C300&ssl=1"},"sameAs":["http:\/\/zaf.web.id","http:\/\/www.facebook.com\/23Pstars","https:\/\/x.com\/23Pstars"],"url":"https:\/\/zaf.web.id\/blog\/author\/zaf\/"}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":117,"url":"https:\/\/zaf.web.id\/blog\/jebakan-halaman-admin-php\/","url_meta":{"origin":434,"position":0},"title":"Jebakan halaman admin PHP","author":"Zaf","date":"April 14, 2011","format":false,"excerpt":"Mungkin kalo diperhatikan judul diatas memang agak membingungkan, tapi yang saya maksudkan disini adalah membuat sebuah konsep halaman admin untuk menjebak seorang hacker mencoba untuk menyerang site kita melalui halaman admin. Terinspirasi dari teman di sebuah forum yang memasang backdoor disebuah situs dan memproteksi backdoor tersebut menggunakan cara ini ^_^\u2026","rel":"","context":"dalam &quot;Inspirasi&quot;","block_context":{"text":"Inspirasi","link":"https:\/\/zaf.web.id\/blog\/category\/inspirasi\/"},"img":{"alt_text":"Screenshot from 2014-11-24 14:31:42","src":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2011\/04\/Screenshot-from-2014-11-24-143142.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1885,"url":"https:\/\/zaf.web.id\/blog\/code-inception-kemudahan-upgrade-versi-php-di-phpstorm\/","url_meta":{"origin":434,"position":1},"title":"Code Inception: Kemudahan Upgrade Versi PHP di PhpStorm","author":"Zaf","date":"September 26, 2022","format":false,"excerpt":"Upgrade selalu menjadi mimpi buruk bagi seorang developer, tidak lepas juga bagi seorang web engineer. Performance dan security menjadi dua aspek yang sangat dipertimbangkan. Perubahan antar versi di PHP secara teknis dapat diketahui, apa saja fitur-fitur baru dan apa saja fitur-fitur yang sudah deprecated. Namun jika harus memeriksa satu persatu\u2026","rel":"","context":"dalam &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/zaf.web.id\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/Screenshot-2022-11-26-at-18.54.35.png?fit=1200%2C725&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/Screenshot-2022-11-26-at-18.54.35.png?fit=1200%2C725&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/Screenshot-2022-11-26-at-18.54.35.png?fit=1200%2C725&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/Screenshot-2022-11-26-at-18.54.35.png?fit=1200%2C725&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/Screenshot-2022-11-26-at-18.54.35.png?fit=1200%2C725&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1501,"url":"https:\/\/zaf.web.id\/blog\/upload-file-sederhana-ke-aws-s3-dengan-php\/","url_meta":{"origin":434,"position":2},"title":"Upload File Sederhana ke AWS S3 dengan PHP","author":"Zaf","date":"Agustus 9, 2020","format":false,"excerpt":"AWS telah menyediakan SDK untuk memudahkan transaksi terhadap beberapa servicenya secara program, salah satu yang disediakan adalah untuk PHP. Namun terkadang kebutuhan tidak sesuai dengan usaha yang harus dikeluarkan. Untuk sekedar upload file ke S3 milik AWS kita perlu load\/download paket lengkap dari SDK nya, rasanya agak berlebihan. Setelah googling\u2026","rel":"","context":"dalam &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/zaf.web.id\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2020\/08\/Screenshot-2024-09-06-at-00.22.03.png?fit=1200%2C813&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2020\/08\/Screenshot-2024-09-06-at-00.22.03.png?fit=1200%2C813&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2020\/08\/Screenshot-2024-09-06-at-00.22.03.png?fit=1200%2C813&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2020\/08\/Screenshot-2024-09-06-at-00.22.03.png?fit=1200%2C813&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2020\/08\/Screenshot-2024-09-06-at-00.22.03.png?fit=1200%2C813&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1954,"url":"https:\/\/zaf.web.id\/blog\/mitigasi-malware-di-web-server-dan-cara-membersihkannya\/","url_meta":{"origin":434,"position":3},"title":"Mitigasi Malware di Web Server dan Cara Membersihkannya","author":"Zaf","date":"November 23, 2022","format":false,"excerpt":"Malware selalu menjadi hal yang merepotkan. Umumnya pembuat malware tidak membuat malware untuk sekedar ajang pamer layaknya defacement. Malware dibuat demi tujuan yang lebih besar dan masif, dan biasanya tidak berjalan secara sendiri-sendiri melainkan menjadi sebuah network atau perkumpulan. Discovery Disuatu pagi tiba-tiba salah satu website yang kami kelola menunjukkan\u2026","rel":"","context":"dalam &quot;Security&quot;","block_context":{"text":"Security","link":"https:\/\/zaf.web.id\/blog\/category\/security\/"},"img":{"alt_text":"Mencari induk malware","src":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/6.-cari-dan-hapus-file-ico.png?fit=795%2C241&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/6.-cari-dan-hapus-file-ico.png?fit=795%2C241&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/6.-cari-dan-hapus-file-ico.png?fit=795%2C241&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2022\/11\/6.-cari-dan-hapus-file-ico.png?fit=795%2C241&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2228,"url":"https:\/\/zaf.web.id\/blog\/ai-untuk-incident-response-malware\/","url_meta":{"origin":434,"position":4},"title":"Memakai AI untuk Incident Response Malware (dengan Batasan yang Aman)","author":"Zaf","date":"November 7, 2026","format":false,"excerpt":"Tulisan saya sebelumnya tentang tips keamanan siber disusun dengan bantuan AI. Kali ini saya ingin lebih teknis: bagaimana AI membantu ketika server benar-benar terinfeksi, dan di mana saya sengaja tidak menyerahkan kendali. Prinsip dasar AI saya perlakukan sebagai analis junior yang cepat membaca, bukan operator yang memegang root. Artinya, AI\u2026","rel":"","context":"dalam &quot;Security&quot;","block_context":{"text":"Security","link":"https:\/\/zaf.web.id\/blog\/category\/security\/"},"img":{"alt_text":"Ilustrasi manusia dan AI menganalisis log server bersama","src":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/Kolaborasi-manusia-dan-AI.jpg?fit=840%2C472&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/Kolaborasi-manusia-dan-AI.jpg?fit=840%2C472&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/Kolaborasi-manusia-dan-AI.jpg?fit=840%2C472&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/Kolaborasi-manusia-dan-AI.jpg?fit=840%2C472&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1957,"url":"https:\/\/zaf.web.id\/blog\/rekomendasi-keamanan-upload-dir-pada-aplikasi-web\/","url_meta":{"origin":434,"position":5},"title":"Rekomendasi Keamanan Upload Dir pada Aplikasi Web","author":"Zaf","date":"Mei 14, 2026","format":false,"excerpt":"Tidak sedikit serangan yang terjadi terhadap website yang mengincar File Upload Vulnerabilities, khususnya website yang berbasis engine populer seperti WordPress. Polanya hampir selalu sama: penyerang menemukan celah di form upload, plugin, atau theme, lalu mengunggah web shell berekstensi .php. Setelah web shell bisa dieksekusi, penyerang bebas menyisipkan malware ke file\u2026","rel":"","context":"dalam &quot;Security&quot;","block_context":{"text":"Security","link":"https:\/\/zaf.web.id\/blog\/category\/security\/"},"img":{"alt_text":"Ilustrasi folder terkunci dan file PHP yang diblokir","src":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/keamanan-upload-dir-chattr.jpg?fit=1200%2C674&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/keamanan-upload-dir-chattr.jpg?fit=1200%2C674&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/keamanan-upload-dir-chattr.jpg?fit=1200%2C674&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/keamanan-upload-dir-chattr.jpg?fit=1200%2C674&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/zaf.web.id\/blog\/wp-content\/uploads\/2026\/11\/keamanan-upload-dir-chattr.jpg?fit=1200%2C674&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4zLnS-70","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/posts\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":3,"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/posts\/434\/revisions"}],"predecessor-version":[{"id":2289,"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/posts\/434\/revisions\/2289"}],"wp:attachment":[{"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/categories?post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zaf.web.id\/blog\/wp-json\/wp\/v2\/tags?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}