⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.java

📁 IDEA is a symetric method to crypt message or document.
💻 JAVA
字号:
package idea;public class Main {    public static void main(String[] args) {                    String cle_String="0123456789ABCDEF0123456789ABCDEF";          idea IDEA=new idea(cle_String);                    String plaintext="Je suis Salem Mathlouthi. Ceci est un test de la m閠hode IDEA.";          int plaintext_length=plaintext.length();          if(plaintext_length%8 !=0)for(int i=0;i<(8-plaintext_length%8);i++)plaintext+=" ";          byte[]plaintext_bytes=plaintext.getBytes();                   byte[]ciphertext_bytes=new byte[plaintext_bytes.length];          byte[]ciphertext2plaintext_bytes=new byte[plaintext_bytes.length];          byte []b=new byte[8];                 for(int i=0;i<plaintext_bytes.length;i+=8){              System.arraycopy(plaintext_bytes,i,b,0,8);              b=IDEA.chiffre(b);              System.arraycopy(b,0,ciphertext_bytes,i,8);          }               for(int i=0;i<ciphertext_bytes.length;i+=8){              System.arraycopy(ciphertext_bytes,i,b,0,8);              b=IDEA.dechiffre(b);              System.arraycopy(b,0,ciphertext2plaintext_bytes,i,8);          }                    System.out.println(new String(ciphertext2plaintext_bytes));    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -