public void encrypt(String file, String encrypted_file) throws Exception {
        FileInputStream input_file = new FileInputStream(file);
        FileOutputStream PGP_file = new FileOutputStream(encrypted_file, true);
        PKESKP keyPacket = new PKESKP(key, pub_exp, mod);
        keyPacket.dump(PGP_file);
        Des encryptor = new Des(key);
        encryptor.encrypt(input_file, PGP_file);
        input_file.close();
        PGP_file.close();
    }