Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-27-2007, 05:23 PM
Junior Member
 
Join Date: Jan 2007
Posts: 14
Default Encryption in ActionScript 3

Hi,

I wanted to encrypt / decrypt Strings in ActionScript 3 using SWFKit.Encryption from my Flex application. I'm trying to use SWFKit.Encryption.blowfishEncode but found some problems:

* Firstly, there is no such static method Encryption.blowfishEncode so I got a compilation error

* I tried new Encryption().blowfishEncode(key, string); this compiled but returned null.

* I looked at the stub ActionScript codes in the SWFKit classes 3 directory and it looks like the Encryption class has not been implemented. The SWFKit classes for ActionScript 2 looks like is doing something which suggests that it has been implemented.

Question: is Encryption class available at all in ActionScript 3? If so, what have I done wrong? If not, when is it going to be available?

Thanks
Eric
Reply With Quote
  #2 (permalink)  
Old 12-01-2007, 07:13 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Encryption in ActionScript 3

In actionscript 3 please do as follows
Code:
var enc = new SWFKit.Encryption;
enc.blowfishEncode(...);
...
enc.Release();
As base class of wrapper classes for actionscript 3 derives from the "Proxy" class, which supports to define methods and properties dynamically, you will have to first construct a new instance of a wrapper class, even if you only need to call a static method.
Reply With Quote
  #3 (permalink)  
Old 12-01-2007, 08:50 PM
Junior Member
 
Join Date: Jan 2007
Posts: 14
Default Re: Encryption in ActionScript 3

Many thanks. It actually works perfectly; I just forgot to run it from the generated exe but ran it straight from my flex app that's why it was always returning null.
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 04:38 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.