Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2008, 02:49 PM
Junior Member
 
Join Date: Oct 2008
Posts: 7
Default Now problem with deleting the file right after encrypting...

Hi,
My code is something like...
Code:
 var file='something.dat';
 Encryption.encFile('theKey',getAppDir()+file,getAppDir()+'enc.dat');
 File(getAppDir()+file).remove();
But it doesn't remove it. When I use size instead remove() it gets the correct size, so I guess, the problem is, the file must be still locked for encryption. Is there a way to set a listener, in order to remove it as soon as the file is released?

I hope someone will say something finally...
Thanks in advance,
Reply With Quote
  #2 (permalink)  
Old 12-14-2008, 11:35 AM
Junior Member
 
Join Date: Apr 2008
Posts: 29
Default

Quote:
Originally Posted by selimhanov View Post
Hi,
My code is something like...
Code:
 var file='something.dat';
 Encryption.encFile('theKey',getAppDir()+file,getAppDir()+'enc.dat');
 File(getAppDir()+file).remove();
But it doesn't remove it. When I use size instead remove() it gets the correct size, so I guess, the problem is, the file must be still locked for encryption. Is there a way to set a listener, in order to remove it as soon as the file is released?

I hope someone will say something finally...
Thanks in advance,
try again:
var file='something.dat';
Encryption.encFile('theKey',getAppDir()+file,getAp pDir()+'enc.dat');
new File(getAppDir()+file).remove();

I do not have to test!!
Reply With Quote
  #3 (permalink)  
Old 12-16-2008, 09:01 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Quote:
Originally Posted by selimhanov View Post
Hi,
My code is something like...
Code:
 var file='something.dat';
 Encryption.encFile('theKey',getAppDir()+file,getAppDir()+'enc.dat');
 File(getAppDir()+file).remove();
But it doesn't remove it. When I use size instead remove() it gets the correct size, so I guess, the problem is, the file must be still locked for encryption. Is there a way to set a listener, in order to remove it as soon as the file is released?

I hope someone will say something finally...
Thanks in advance,
The encFile does not lock the file. However, your method is not so good from the security point of view. It is highly recommended that you do everything in memory, without using intermediary file.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:29 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.