Jumat, 14 Oktober 2016

script encode dan decode


1. Script Encode dan Decode


            <?php
                $plaintext  = 'Ini Blogrecodek.blogspot.co.id';
                //encode plaintext
               $encode = base64_encode($plaintext);
               //decode plaintext
              $decode = base64_decode($encode);
              echo "text = ".$plaintext. "<br/>";
              echo "text yang diencode = ". $encode. "<br/>";
              echo "text yang didecode = ".$decode;
          ?>


    Hasilnya :
                  text = Ini Blogrecodek.blogspot.co.id
                  text yang diencode =SW5pIEJsb2dyZWNvZGVrLmJsb2dzcG90LmNvLmlk
                  text yang didecode =Ini Blogrecodek.blogspot.co.id
 2. Script Hashing
         Contoh hashing pada MD5
 <?php            
      $plaintext = 'ini blog recodeku.blogspot.co.id.'; 
      //md5 hash 
      $md5 = md5($plaintext); 
      //sha1 hash 
      $sha1 = sha1($plaintext); 
      //crc32 hash 
      $crc32 = crc32($plaintext); 
      echo "teks = ".$plaintext."<br/>";  
      echo "MD5 Hash = ".$md5."<br/>"; 
      echo "SHA1 Hash = ".$sha1."<br/>"; 
      echo "CRC32 Hash = ".$crc32."<br/>"; 
 ?> 
 Hasilnya :
              
       teks = ini blog recodeku.blogspot.co.id
       MD5 hash = 30e025073aa5ae7cc991143b7dbf8ab6
       SHA1 hash = c59ee049945de5f4d2d0e4babc6bd66192a0b21d
       CRC32 hash = 459548244  

1 komentar:

  1. Casino & Hotel Near San Francisco - MapYRO
    A map showing 과천 출장안마 casinos 경주 출장마사지 and 의정부 출장안마 other gaming facilities located near Casino & Hotel, located in San Francisco at 밀양 출장마사지 1 군산 출장안마 Fremont Street, Casino and Hotel Parking.

    BalasHapus