Cryptology / Introduction

Discussion in 'Cryptography - Encryption' started by modernee, Mar 17, 2018.

  1. modernee

    modernee New Member

    [​IMG]

    Let's not really mix it with cryptography, it's different from cryptography. Cryptology is developed to allow people outside of those who want it to read texts. Now, let us look at the algorithm of Caesar's brother in simplest terms, he was the king of Rome himself.

    Now the logic is done like this. Bi 'length is selected, shifting letters by that length. If it crosses the letter Z, the alphabet starts all over again. If the decrypt operation is to be performed, it is shifted back by that length.

    As an example, let's encrypt the Mapzilla word with 5 length. In the meantime, I will not count Turkish characters.

    Something turns out to be fun.
    Let's do this in Java.

    Code:
     Scanner scan = new Scanner (System.in);
        String Password;
        int Length;
        int Temp;
        
        Sifre = scan.nextLine ();
        Length = scan.nextInt ();
        
    
        
        i <Sifre.length (); ++ i) {
          Temp = Sifre.charAt (i); // It takes the letters in the order of the password variables.
          Length temp + = 26%; // shifted.
    
          if (Temp> 'z') {
            Temp- = 26; // If Z crosses here, the alphabet is restarted. Here we look at the use of numbers in the ASCII table, you can think of 26 as a 'char'.
          }
          
          else {
            if (Temp> 'Z') {// We did the same for upper case.
             Temp- = 26;
            }
          }
    
            
          
        }
      }
    }
     

Share This Page