0

我想使用 ElGamal 加密。我可以用 a 做到这一点File,但我不知道如何用 a 做到这一点String

像这样:

public static String decrypt(String encrypted_sql) {
  File f = new File(sPrFile);

  ElGamalPrivateKey elpr = null;
    try {
      elpr = new ElGamalPrivateKey(sPrFile);
    } catch (IOException ex) {
      JOptionPane.showMessageDialog(null,"ERROR : " +e x.getLocalizedMessage() +
        "\n kullanıcı : "+username+"\n password : "+password);
      Logger.getLogger(ppi_script_execute.class.getName()).log(Level.SEVERE, null, ex);
    }
    return ElGamalAlgorithm.decrypt2(encrypted_sql, elpr);
  }

}

我不想使用sPrFile. 我想使用String变量。我的钥匙是这样的:

Key 600 d99f0d547sdfs6d8f49sd96f65sd1f3827af14a34654dbb285fcbc8019df1fd7c152d5e25
        7157f53e2‌​0d4613b270a7b656790c5a723a88asdasd58d6fe2dd0dd810365b8574c253be2
        26e7da90eb61578eb197e764761f7e6955009f7d6339245244044bd7301e40ee3f423fef6
        26cc35c86fc7‌6716db47d85ecff5a5dd3bd8655sdf8sd6f6sd6f86sd4f65686w9w9e46sd5
        f65s6d6s4d6f6ss6df 4546cfe42842c82cb9cda6b954632ae8201dcde3b6af0bbd7‌​61879
        zzf89yfdd28db4bca70ss48w16fc8ff7e38a40dfc05f48caaffcc61d1972ff0b3
4

0 回答 0