• Post Reply Bookmark Topic Watch Topic
  • New Topic

java code to encrypt a file  RSS feed

 
pavithra murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friend ,

i have written a code for encrypting a file .....but it is leading could anyone please help me out ...

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "it is leading" mean? Also, the code looks as if it wouldn't even compile.
 
pavithra murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i have written a code for encryption of file keystore.ks

but it is showing an error at this point


AT THIS LINE ERROR IS COMING
cis = new CipherInputStream(fis,encrypt);

ERROR : fis variable might not have been initalized .
bUT i have initialized it in the program as
FileInputStream fis

could anyone please help me out in resolving this error please

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove the try/catch handler around the "fis = new FileInputStream(args[0])" statement. Why do you have that statement twice, by the way?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!