Anyone know of a good File Encryption Java program?

Preferably a program that has source code available. I'm working on making the password saving function of my program secure. I already have it so the user has to have 2 passwords. The 2nd password is used as a key to encrypt the 1st password. I will then save it to a file. Now I want to encrypt the file itself.

Why not encrypt the file the same way you encrypt the password?

Similar Messages

  • Does anyone know of any "Enter license key" java programs

    I'm making a file sharing program and I need to use a "Enter license key" applet. I don't like making things from scratch.

    I'm making a file sharing program and I need to use a "Enter license key" applet. I don't like making things from scratch.

  • Anyone know of a good way to move finalcut pro X to an external HD without loosing any of the project files?

    Anyone know of a good way to move finalcut pro X to an external HD without loosing any of the project files?

    If you're looking for improved performance, you should move your events and projects to an external FW800 or faster drive.
    The FCP X application itself should reside in your Applications folder on your system drive.
    If you're talking about backing up to another drive, I use a cloning application (SuperDuper) to clone my working drive to my backup drive two or three times a day.
    If you want to install FCP X on another computer, simply download it again from the App Store (using the same Apple ID you used to purchase the app).
    Andy

  • Anyone know of a good IOS app that can play all media files across a home network, file share on a NAS or Windows PC??

    anyone know of a good IOS app that can play all media files, MKV, AVI, Xvid with subtitles across a home network, file share on a NAS or Windows PC?? I know I have BS player free for android, works pretty good on my nexus tablet.  is there a good IOS one that anyone can think of that can browse the network?
    or do I have to run transcoders?
    I store some files on the windows PC and some files on a linux NAS that the windows PC maps to

    I'm sorry to hear that.
    I'm not affiliated w/ the developer, just a happy user that gave up fighting the apple podcast app a while ago.  I used to have a bunch of smart playlists in itunes for my podcasts, and come home every day and pathologically synced my phone as soon as I walked in the door, and again before I walked out the door in the morning.
    Since my wife was doing this too, we were fighting over who's turn it was to sync their phone.
    Since I've switched to Downcast, I no longer worry about syncing my phone to itunes at all.  I can go weeks between syncs.
    Setup a "playlist" in downcast (ex., "Commute") and add podcasts to that playlist.  Add another playlist ("walk" or "workout") and add different podcasts to that one. 
    Set podcast priorities on a per-feed basis (ex., high priority for some daily news feeds, medium priority for some favorite podcasts, lower priority for other stuff).  Downcast will play the things in the priority you specify, and within that priority, it will play in date order (oldest to newest).
    Allegedly, it will also sync your play status to other devices, although that is not a feature I currently use and can't vouch for.  It uses apple's iCloud APIs, so to some extent may be limited by what Apple's APIs can do.

  • This does not have to do with java but does anyone know of a good c forum?

    I have found some but there newest post on there is like 3 days old to a month. and I was just wondering if anyone know of a good one by chance?Cause I have a prob.ok well thanks for ya time.

    I have found some but there newest post on there is
    like 3 days old to a month. and I was just wondering
    if anyone know of a good one by chance?Cause I have a
    prob.ok well thanks for ya time. Found one on Google that looks up to date to me:
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=comp.lang.c

  • Anyone know of a good unix forum so i dont have to ask unix questions here?

    Anyone know of a good unix forum so i dont have to ask unix questions here?
    and how bout a good unix tutorial?

    what is solaris dev?
    What's wrong with asking unix questions. Anyways,if
    you go to the sun home page http://www.sun.com I
    think
    there is a solaris dev connection.
    What I meant was the solaris developer connection.
    Solaris is Sun's version of unix. just like this forum is part of the java developer connection I'm sure that they have a forum for unix.

  • Does anyone know of any Sun Classes for Java Cryptographic Extension -JCE ?

    Hello - anyone know of any Sun Classes for Java Cryptographic Extension? If so do you have the Sun class code/s?
    Edited by: Mister_Schoenfelder on Apr 17, 2009 11:31 AM

    Maybe this can be helpful?
    com.someone.DESEncrypter
    ======================
    package com.someone;
    import java.io.IOException;
    import java.io.UnsupportedEncodingException;
    import java.security.spec.AlgorithmParameterSpec;
    import java.security.spec.KeySpec;
    import javax.crypto.Cipher;
    import javax.crypto.IllegalBlockSizeException;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    public class DESEncrypter {
        Cipher ecipher;
        Cipher dcipher;
        // 8-byte Salt
        byte[] salt = {
            (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
            (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03
        // Iteration count
        int iterationCount = 19;
        public DESEncrypter(String passPhrase) {
            try {
                // Create the key
                KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
                SecretKey key = SecretKeyFactory.getInstance(
                    "PBEWithMD5AndDES").generateSecret(keySpec);
                ecipher = Cipher.getInstance(key.getAlgorithm());
                dcipher = Cipher.getInstance(key.getAlgorithm());
                // Prepare the parameter to the ciphers
                AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);
                // Create the ciphers
                ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
            } catch (java.security.InvalidAlgorithmParameterException e) {
                 e.printStackTrace();
            } catch (java.security.spec.InvalidKeySpecException e) {
                 e.printStackTrace();
            } catch (javax.crypto.NoSuchPaddingException e) {
                 e.printStackTrace();
            } catch (java.security.NoSuchAlgorithmException e) {
                 e.printStackTrace();
            } catch (java.security.InvalidKeyException e) {
                 e.printStackTrace();
        public DESEncrypter(SecretKey key) {
            try {
                ecipher = Cipher.getInstance("DES");
                dcipher = Cipher.getInstance("DES");
                ecipher.init(Cipher.ENCRYPT_MODE, key);
                dcipher.init(Cipher.DECRYPT_MODE, key);
            } catch (javax.crypto.NoSuchPaddingException e) {
                 e.printStackTrace();
            } catch (java.security.NoSuchAlgorithmException e) {
                 e.printStackTrace();
            } catch (java.security.InvalidKeyException e) {
                 e.printStackTrace();
        public String encrypt(byte[] data) {
             return encrypt(new sun.misc.BASE64Encoder().encode(data), false);
        public byte[] decryptData(String s) throws IOException {
             String str = decrypt(s, false);
             return new sun.misc.BASE64Decoder().decodeBuffer(str);
        public String encrypt(String str, boolean useUTF8) {
            try {
                // Encode the string into bytes using utf-8
                byte[] utf8 = useUTF8 ? str.getBytes("UTF8") : str.getBytes();
                // Encrypt
                byte[] enc = ecipher.doFinal(utf8);
                // Encode bytes to base64 to get a string
                return new sun.misc.BASE64Encoder().encode(enc);
            } catch (javax.crypto.BadPaddingException e) {
                 e.printStackTrace();
            } catch (IllegalBlockSizeException e) {
                 e.printStackTrace();
            } catch (UnsupportedEncodingException e) {
                 e.printStackTrace();
            } catch (java.io.IOException e) {
                 e.printStackTrace();
            return null;
        public String decrypt(String str, boolean useUTF8) {
            try {
                // Decode base64 to get bytes
                byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
                // Decrypt
                byte[] utf8 = dcipher.doFinal(dec);
                // Decode using utf-8
                return useUTF8 ? new String(utf8, "UTF8") : new String(utf8);
            } catch (javax.crypto.BadPaddingException e) {
                 e.printStackTrace();
            } catch (IllegalBlockSizeException e) {
                 e.printStackTrace();
            } catch (UnsupportedEncodingException e) {
                 e.printStackTrace();
            } catch (java.io.IOException e) {
                 e.printStackTrace();
            return null;
         // Here is an example that uses the class
         public static void main(String[] args) {
             try {
                 // Generate a temporary key. In practice, you would save this key.
                 // See also e464 Encrypting with DES Using a Pass Phrase.
                 SecretKey key = KeyGenerator.getInstance("DES").generateKey();
                 // Create encrypter/decrypter class
                 DESEncrypter encrypter = new DESEncrypter(key);
                 // Encrypt
                 String encrypted = encrypter.encrypt("Don't tell anybody!", true);
                 // Decrypt
                 String decrypted = encrypter.decrypt(encrypted, true);
             } catch (Exception e) {
                  e.printStackTrace();
              try {
                  // Create encrypter/decrypter class
                  DESEncrypter encrypter = new DESEncrypter("My Pass Phrase!");
                  // Encrypt
                  String encrypted = encrypter.encrypt("Don't tell anybody!", true);
                  // Decrypt
                  String decrypted = encrypter.decrypt(encrypted, true);
              } catch (Exception e) {
                   e.printStackTrace();
    }

  • I can't switch apps on my iPhone 4.  I have 9.3 GB of free space out of 30 GB. Rebooting doesn't fix the problem.  Does anyone know of a good fix?

    I can't switch apps/programs on my iPhone 4.  Whatever app I'm in is the only app I can use unless I restart my iPhone.  Then I can choose a new app/program to use but then it's stuck on that app/program until I reboot my iPhone.  Syncing it with iTunes doesn't seem to fix the problem and I regularly close apps/programs so I never have many multi-tasking.
    This problem sometimes goes away for a brief period of time (an hour or two) but it's pretty much been this way for the past 48 hours.
    I have a 32 GB iphone 4 that has the following on it:  4.9 GB Audio, 8.2 GB Photos, 6.2 GB Apps, 0.58 GB Other, 9.3 GB Free.
    I am using iOS v 4.3.5
    Does anyone know of a good fix?

    You mentioned rebooting, have you tried a cold reboot? That is is holding the home and lock buttons down for about 15 seconds?
    Ignore the slider asking to turn off, just keep holding. Once it goes off continue to hold for about 10ish more seconds and it will eventually turn back on.
    Suggestion only.

  • Anyone know of a good TV (mini) antenna

    I have a Qosmio F20-136 Does anyone know of a good indoor tv aerial I can use to connect to the laptop. Any experiences of any good ones? I've heard of a DVB TV antenna, has anyone use one and got a good reception?

    Hello
    Unfortunately I can not give you some suggestion because I am also interested about that but without experience. I have checked a lot of internet dealers and really dont know which one will be the best choice.
    This one is very interesting to me http://www.freecom.com/ecProduct_detail.asp?ID=2234
    If you buy one someday, please let me know if it works well with your notebook.
    Bye

  • Does anyone know of a good A3 photo scanner compatable with OS 10.8 mountain lion? I need it to scan watercolour artwork. I was interested in Microtek scanmaker 9800XL and also Epson Expression 10000 but neither are compatible. Thanks :-)

    Does anyone know of a good A3 photo scanner compatable with OS 10.8 mountain lion? I need it to scan watercolour artwork. I was interested in Microtek scanmaker 9800XL and also Epson Expression 10000 but neither are compatible. Thanks :-)

    Daniel Craigie-
    How full is the hard drive that you are trying to save to? Not that it should matter, but have you tried scanning another document?
    Is the scanner plugged directly into the Mac? Try it that way.
    Disconnect all peripherals except keyboard, monitor, mouse and scanner and see if the problem goes away.
    Luck-
    -DaddyPaycheck

  • Does anyone know how to convert file into a .png?

    Does anyone know how to convert file into a .png?
    Thanks

    I tried to give an answer with less steps. I know it's a Pages file & all you have to do is select & copy the content in your Pages file & then open Preview.app. Next time I'll include the exporting to PDF & opening that in Preview.app or in Pages go to File > Print > click on the PDF button in the lower left of the print window & choose Open in Preview.

  • Does anyone know of a good online video instruction on how to put together a photo slideshow in the new iMovie version. I found uTube videos using imported videos, but I want to use photos in iPhoto.

    Does anyone know of a good online video instruction on how to put together a photo slideshow in the new iMovie 11 version. I found uTube videos using imported videos, but I want to use photos in iPhoto. I'm very familiar with how to do this in the pervious version, but it's no so intuitive in the new version.

    Has anyone tried this one.. I am not sure if I am allowed to post information about other products... so if I am not please delete this part of my message.
    New Trent Arcadia Pack IMP70D 7000mAh?

  • How many softwares are there to create a setup file for java programs

    Hi, i am new to java
    I want to know how many softwares are there to create a setup file for java programs.
    I know one software i.e java launcher to create a setup file.
    I want to know about any other softwares are available to create a setup file for java programs.
    I created a setup file for swings program in JCreator.
    And don't think that i am wastiing ur time with this question .
    Help me regarding this topic.
    Thanks in Advance

    superstar wrote:
    I want to know how many softwares are there to create a setup file for java programs.13, no wait, 42.
    I know one software i.e java launcher to create a setup file.You should clearly identify what you think you already know.
    I want to know about any other softwares are available to create a setup file for java programs.
    I created a setup file for swings program in JCreator.Is this the one you talked before, or is this different?
    And don't think that i am wasting ur time with this question .Why should I not think that?

  • How to store a data on txt file through java program

    that means i want a coding for write data on txt file using java program.that storing data is stored like this formate,
    sathees
    krishnan
    rama
    suresh
    Stored on one by one. not like this
    sathees krishnan rama suresh.........

    import java.io.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    public class rsk1{
    public static void main (String argv []){
    try {
    String sr[] = new String[100];
                   String s1=" ";
                   int j=0;
                   DataInputStream in = new DataInputStream(System.in);
                   OutputStream f1 = new FileOutputStream("file1.txt");
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    Document doc = docBuilder.parse (new File("book.xml"));
    // normalize text representation
    doc.getDocumentElement ().normalize ();
    System.out.println ("Root element of the doc is " +
    doc.getDocumentElement().getNodeName());
    NodeList listOfPersons = doc.getElementsByTagName("person");
    int totalPersons = listOfPersons.getLength();
    System.out.println("Total no of people : " + totalPersons);
    for(int s=0; s<listOfPersons.getLength() ; s++){
    Node firstPersonNode = listOfPersons.item(s);
    if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){
    Element firstPersonElement = (Element)firstPersonNode;
    NodeList firstNameList = firstPersonElement.getElementsByTagName("first");
    Element firstNameElement = (Element)firstNameList.item(0);
    NodeList textFNList = firstNameElement.getChildNodes();
    sr[++j]=((Node)textFNList.item(0)).getNodeValue().trim();
    NodeList lastNameList = firstPersonElement.getElementsByTagName("last");
    Element lastNameElement = (Element)lastNameList.item(0);
    NodeList textLNList = lastNameElement.getChildNodes();
    sr[++j]=((Node)textLNList.item(0)).getNodeValue().trim();
    NodeList ageList = firstPersonElement.getElementsByTagName("age");
    Element ageElement = (Element)ageList.item(0);
    NodeList textAgeList = ageElement.getChildNodes();
    sr[++j]=((Node)textAgeList.item(0)).getNodeValue().trim();
    NodeList stuList = firstPersonElement.getElementsByTagName("stu");
    Element stuElement = (Element)stuList.item(0);
    NodeList textstuList = stuElement.getChildNodes();
    sr[++j]=((Node)textstuList.item(0)).getNodeValue().trim();
    }//end of if clause
    }//end of for loop with s var
    System.out.println("Process completed");
    for(int i=1;i<=j;i++)
                   byte buf[] = sr.getBytes();
                                       byte buf1[] = s1.getBytes();
         f1.write(buf);
                                       f1.write(buf1);
    f1.close();
    }catch (SAXParseException err) {
    System.out.println ("** Parsing error" + ", line "
    + err.getLineNumber () + ", uri " + err.getSystemId ());
    System.out.println(" " + err.getMessage ());
    }catch (SAXException e) {
    Exception x = e.getException ();
    ((x == null) ? e : x).printStackTrace ();
    }catch (Throwable t) {
    t.printStackTrace ();
    }//end of main

  • Updation in zip file through java program

    Hi,
    Can any buddy help me updating zip file using java programs. I dont want to delete the zip file but I want to update single file in the zip.
    Any clue ?
    Regards,
    Ashish

    I mean I want to update a zip file using java program.
    Suppose there are 4 files zipped into single zip file.
    zipped.zip contains a.txt, b.txt. c.txt. d.txt
    Now the contect of a.txt got changed and I want to update zipped.zip to with the changed a.txt.
    I have one way of creating a new file with new set of a.txt, b.txt, c.txt and then delete the earliar zipped.zip and rename the newly created zipped to zipped.zip.
    I dont want to do the same as above mentioned way. Is there any way provided in java API to remove any entry or update any entry?
    I feel now the problem has got explained in details.
    Any help ?

Maybe you are looking for

  • Contour Plug In For Illustrator

    Hello everyone... Thank you in advance for any help you may be able to provide. Perhaps there is a thread for this already. I apologize if that is the case. I work for a manufacturing organization creating technical illustrations, instruction sheets,

  • Problems with the transcode settings in Encore cs5

    the load of the transcode setting in Encore does not work? the surface of encore begins to flicker when a sequence or a timeline-is imported? I need help and tips! greetings, julius

  • Managing and Accessing Years of Flash Artwork Assets?

    After working with Flash for a long time I've created a lot of artwork in many *.FLA files. I would like the artwork in these files to be easily accessible to both myself and my colleagues for future use but am not sure how to do this. So say a manag

  • Using free hotspots in Italy and Greece

    I am going to be on a cruise and taking my iPad to Skype (video) to home when on land at free hotspots.  Is this going to be possible?  If I want to call a mobile number back home, what do I buy? Skype WiFi? Skype credits? or get a subscription for 3

  • Help in joining results

    hi experts, i am newbie, please help me with my sql query table1 id X 1 1 2 1 3 1 1 1 3 1 table2 id Y 1 1 2 1 4 1 5 1 2 1 required output id X Y 1 2 1 2 1 2 3 2 0 4 0 1 5 0 1 my following query produces wrong output, please help me to correct/rewrite