User Profile
Collapse
-
help on encryption key
hello..i have an issue about encryption key.i have generate a key using secretkey, can it be save to a file?!..does the process are just the same like writing a string to a file?!..and then retrieving the key,does it are the same like reading the file?!.. -
nope.string buffer need you to manually input the char that we want to.in my case i want "some" process which can help the string to be expand to 24 char by the process automatically. -
what i mean is that if i insert a string, which is "java".can i increase the length the string into 24 char after some operation?Leave a comment:
-
increase string length
how do i increase a string into default lenght?
for example i put a string, java.how to transform the string to for example 24 character in it? -
java tcp/udp chat program with GUI
i have build the gui but i am having problem with implementing the tcp/udp. can somebody help me.
i have server and client. the server can chat with the client. when i tried to to use the udp of tcp the gui seems hangs..
this is the code for server
...Code:package ds; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.*; import java.net.*; import
-
problem solve..after i use the file chooser, i called the getTypeDescript ion() and i really work.thanks for the guidance.mahaloLeave a comment:
-
string from CipherOutputStream
hello..i got problem in my function. this function is for encrypt a string that was pass to this function....Code:void EncodeData( Cipher aCipher, String plaintext ) throws InvalidKeyException { // initialize the Cipher in encrypt mode aCipher.init( Cipher.ENCRYPT_MODE, secretKey ); byte[] outputArray = null; // produce a byte array from the string, using the platform's // default character -
the problem is with your for loop..instead start from 0, start from 9. the string is stored in array.Leave a comment:
-
sun.misc.BASE64Decoder
Hello again..i have a problem on importing sun.misc.BASE64 Decoder, when i type for example
i get an error saying cannot find symbol..i already putCode:System.out.println("Cipher Text: " + new sun.misc.BASE64Decoder(ciphertext));
but when i typeCode:import sun.misc.BASE64Decoder.*;
i doesn't have any error.....Code:return new sun.misc.BASE64Encoder().encode(bos.toByteArray());
-
ok..let's start from the beginning..i have a string1("Intern et Explorer"). then i want to encrypt it using DES for example.in order to encrypt the string1, we need a key which represent we are using DES encryption. what i want to do is i have another string2 which is "dessecret" . then i use the string to generate key for the encryption.
...Code:KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
Leave a comment:
-
what is mean is, i have a password.then i transform the password into a key to encrypt for example a string using some algo for example blowfish. if we what to encrypt, a key is needed right. What is confusing me is on how to create our own key using the password(a string) and then encrypt some string using some other algo.sorry but your are not getting what in my mind,...Leave a comment:
-
i found a code similar in what i am looking for but when i compile, it suppose to have different cipher text between both string but all i got is the same..
...Code:public static void testUsingPassPhrase() { System.out.println(); System.out.println("+----------------------------------------+"); System.out.println("| -- Test Using Pass Phrase Method -- |");Leave a comment:
-
what i mean is can the extension be displayed after we select some file?...Leave a comment:
-
Java DES
hello..i am working on encrypting string in des..instead of generating the key, how can i make it encrypt using other key that i desire?!.. -
still i didnt get it.for example,i use JFileChooser to select file..then after i select any file.it will display the file type.Leave a comment:
-
calling function from other java file
hello..i am having a difficulties in calling the function in other file.
for example..this is the file that use xxx.java;
...Code:package netbean5test; import netbean5test.xxx; import java.awt.*; import java.awt.event.*; import javax.swing.*; //button import java.io.*; public class testpopup extends JFrame implements ActionListener{ private JButton -
Displaying what type of file
hello..is it possible to write a java program which can retrieve the type of files when we select the file. -
actually..i make the code by reading examples..such as how to copy file..how to implements listeners..then i combine it as one..Leave a comment:
-
no..i have read through http://java.sun.com/j2se/1.4.2/docs/...a/io/File.html
but seems i cannot understand pretty well.Leave a comment:
-
...Code:public void actionPerformed(ActionEvent e){ String x = "\\"; //Handle open button action. if (e.getSource() == openButton) { int returnVal = fc.showOpenDialog(PilihFail.this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); //This is where aLeave a comment:
No activity results to display
Show More
Leave a comment: