Пример #1
0
        public void GenAndSendKey()
        {
            String public_key  = TeraCrypt.GenPublicKey();   //CryptManager.GenPublicKey();
            String decrypt_key = TeraCrypt.DecryptKeyOfPublicKey(public_key);

            Decryptor = new NeoString(decrypt_key);
            write("JK" + public_key);
            //flush();
        }
Пример #2
0
 public void println(String s)
 {
     if (s == null)
     {
         s = "null";
     }
     if (Decryptor != null)
     {
         s = TeraCrypt.toUtf(Decryptor.encrypt(s));
     }
     //System.out.println("SERV >> CLIENT:{" + s + "};");
     write(s + (char)0x00);
 }