Quyidagi sahifa orqali kiritilgan matnni Sezar shifriga o’tkazish mumkin. Buning uchun HTML , CSS, PHP texnologiyalaridan foydalanildi.
html>
Sezar Shifrlash algoritmi
Shifrlanadigan matnni kiriting:
Shifrlangan matn:
$m= $_POST["shifrlashkk"];
$harf="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$mm="";
$countm=strlen($m);
for($i=0;$i<$countm;$i++){
if(strpos($harf,strtoupper($m[$i]) )>=23){
$t=strpos($harf,strtoupper($m[$i]))+3-26;
$mm.=$harf[$t];
}else {
$t=strpos($harf,strtoupper($m[$i]))+3;
}
echo $mm;
?>
Deshifrlash oynasiga o'tish uchun bosing
Deshifrlash
Deshifrlanadigan matnni kiriting:
Deshifrlangan matn:
$m= $_POST["deshifrlashkk"];
$mmm="";
if(strpos($harf,strtoupper($m[$i]))<3){
$t=strpos($harf,strtoupper($m[$i]))+26-3;
$mmm.=$harf[$t];
$t=strpos($harf,strtoupper($m[$i]))-3;
echo $mmm;
Shifrlash oynasiga o'tish uchun bosing
© Boltayev Diyorbek