From:Sanjay S Gurav/sgurav1/LSU@c... on 06/27/2002 12:40 PM ZE3
hi,
I want to get the file Encrypted and decrypted. But it is not giving
so. I am trying but not getting. Please see if you can find something.
Thanks,
Sanjay
Sent by: "Michael \"Nazgul\" C." <nazgul@c...>
Please respond to "Professional Java" <pro_java@p...>
To: "Professional Java" <pro_java@p...>
cc: (bcc: Sanjay S Gurav/sgurav1/LSU)
Subject: [pro_java] Re: need help
Hello!
So what kind of output you expect?
Your programm when starts, executes main method.
In your main you have no call to any methods, only create key.
Add more logic in your main to see the output :).
GL
Michael
----- Original Message -----
From: "Sanjay S Gurav" <sgurav1@l...>
To: "Professional Java" <pro_java@p...>
Sent: Tuesday, June 25, 2002 10:46 PM
Subject: [pro_java] need help
> hello,
> I am referring the professional Java Security Book
> (ISBN:1-861004-25-7), published by wrox press Birmingham, UK. I am
> referring
> page numbers 84-89 (CipherStream Example-FileEncryptor). In the program
> three command line arguments. But I want to remove that and run by (javac
> FileEncryptor.java). The program is running but output is nnot coming.
> Kindly let me know where the error is?
>
>
> Thanks Sanjay
>
>
> Program:-----------
> import java.security.*;
> import javax.crypto.*;
> import javax.crypto.spec.*;
> import java.io.*;
> import java.io.File;
>
> /**
> * This class encrypts and decrypts a file using CipherStreams
> * and a 256-bit Rijndael key stored in the filesystem.
> */
>
> public class encryptor
> {
> private static String KEY_FILENAME="rijndaelkey.bin";
> private static int ITERATIONS=1000;
>
> public static void main (String [] args )
> throws Exception
> {
> // Convert the password into a char array
> char [] password = "sasquatch".toCharArray();
> PBEKeySpec keySpec=new PBEKeySpec(password);
> // PBEKeySpec keySpec = new PBEKeySpec (password);
>
> }