Encrypt as3.0 object
GoodMorning,
i have an array of array that is saved in a cookie.
can i encrypt the cookie in some way?
please help me.
Thanks
Markus
Have a look here:
http://sourceforge.net/projects/f-tea
The output data is in a format that's URL friendly, meaning
it can be stuck
into cookies, appended to URL variables, put into XML, and so
on. Just don't
lose the encryption key!
Regards,
Patrick Bay
BAY NEW MEDIA
"markuspedro" <[email protected]> wrote in
message
news:foa3qf$oin$[email protected]..
> GoodMorning,
> i have an array of array that is saved in a cookie.
> can i encrypt the cookie in some way?
>
> please help me.
> Thanks
> Markus
Similar Messages
-
ORA-28336: cannot encrypt SYS owned objects
Hi ,I am getting the following error during impdp.
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-31693: Table data object "IDCFAPP"."ROBJECTOFSERVICE" failed to load/unload and is being skipped due to error:
ORA-28336: cannot encrypt SYS owned objects
any suggestions?ORA-31693: Table data object string failed to load/unload and is being skipped due to error: string
Cause: Table failed to load or unload due to some error.
Action: Check load/unload error, correct problem and retry command.
This error is most likely because the SQL statements were run from the SYS user account
~ Madrid -
Hi Folks,
can we encrypt and decrypt a xml bean object .
i have a xml bean encoded file which contains all questions and now user need to take a exam ,problem here is user can see that xml file in text editor in readble format.
Now how can i encrypt xml file and decrypt it back when application starts.
Thanks in Advancelakshmiindia wrote:
Hi Folks,
can we encrypt and decrypt a xml bean object .
i have a xml bean encoded file which contains all questions and now user need to take a exam ,problem here is user can see that xml file in text editor in readble format.
Now how can i encrypt xml file and decrypt it back when application starts.
You can't do this securely since any decryption key needed by the application must be available to the application and therefore easy to get at by a knowledgeable attacker. On this basis and since you have a fairly big learning curve to implement any encryption, why not simple Base64 encode the whole file. Easy for anyone in the know to decode but it might be good enough for a school/college/university project. -
Encryption of folder object in J2ME
hello, is there an API that i can use to encrypt/decrypt the folder object (not the files inside the folder) using J2ME (currently using bouncycastle)?
prasad_at_sun wrote:
Thanks for your reply. In my case we have the application server setup at client side only (third party is testing our application and according to their need we have to handover the things in their hands) where i am deploying jar/war files. I am still without solution..What don't you understand about "You can't do it." ?
It's very simple really - whatever the language it makes no sense to encrypt the 'code' since to execute the code the execution engine needs to decrypt the 'code' before it can execute it so it has to have access to the decryption key. If the execution engine has access to the key so does anyone who has access to the execution engine. -
So I'm trying to store a compressed ByteArray in a
SharedObject. It kind of seems to work, but then I have a problem.
When I retrieve the ByteArray from the SharedObject I uncompress
it, convert to BitmapData, wrap it in a Bitmap (this is so
ridiculous!), and finally add it to the DisplayObject list.
Sometimes it works sometimes I got an error saying that the data
couldn't be uncompressed.
After a bit of thought I think I've come to the realization
that the ByteArray in the SharedObject is just like any other Array
in memory and when I uncompress the "copy" I made the original was
also uncompressed. Even though I never ordered a
SharedObject.flush() the so must have been written. So that the
next time I came back the data in the shared object was already
uncompressed.
Does that seem to make sense?
So my plan will be to "clone" the data out of the
SharedObject. But how to do that? The old Array.slice() trick
doesn't work on the ByteArray. Obviously I can just copy every
element, but I'm worried that could get slow. Any other tricks?
Another approach I guess would just be to always recompress
the data when I'm done with it so that it remains compressed in the
SharedObject. Hmmmm… Anybody got any ideas?
Here is my code. It is messy because this is all new to me as
is AS3 and its structure. If anybody has any good pointers on how
to work with SO and storing lots of ByteArrays (and other info)
that would be great!Kglad:
Is the following code what you meant by evaluating?
I get this error, which I believe is because whole_master movie clip isn't on frame 1, but on parte8 (frame 70).
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at LM_Instructor_fla::MainTimeline/frame1()
function testSO(): void
if(so.data.whole_master==null){gotoAndStop("frontPage")}
if(whole_master==null){gotoAndStop("frontPage")}
var so=SharedObject.getLocal("learningGames", "/");
so.data.whole_master=whole_master;
so.data.g_level_1=whole_master.g_level_1;
so.data.g_level_22 =whole_master.g_level_22;
so.data.g_level_33 =whole_master.g_level_33;
function checkSO(): void
if (so.data.whole_master.g_level_1==true) {whole_master.gotoAndStop("g_level_1")}
if (so.data.whole_master.g_level_22==true) {whole_master.gotoAndStop ("g_level_22")}
if (so.data.whole_master.g_level_33==true) {whole_master.gotoAndStop ("g_level_33")} -
Compare 2 encrypted String Java Objects
Hi,
I am have encrypted the passwords of my change password page using the java.security.messagedigest API and stored in string object.
Can any one pls tell me how to compare these 2 encrypted objects.
Thanks
Hem Pushap KaushikHi,
Message Digest can be compared using
boolean compare = java.security.MessageDigest.isEqual(byte[] digesta, byte[] digestb) ;hope this helps.
Regards,
Aparajith -
How to garbage collect an newed as3 Sound Object from memory?
For example, using next text code:
package
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.system.*;
import flash.system.*;
public class Main extends Sprite
[Embed(source = "../data/SongScene8.mp3")] protected var SongScene8:Class;
public function Main():void
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
private function init(e:Event = null):void
removeEventListener(Event.ADDED_TO_STAGE, init);
System.gc();
trace("Before");
trace(System.totalMemory);
trace("_________________")
var sound:Sound = new SongScene8();
System.gc();
trace("After new");
trace(System.totalMemory);
trace("_________________")
sound = null;
System.gc();
trace("After null");
trace(System.totalMemory);
The output is:
Before
3461120
After new
3604480
After null
3604480
* Even if the gc runs a thousand times after, the last, increased value remains.
* I've tested this too by importing an mp3 from an .swc, rather than from a file. The result is similar.
* Tracing System.privateMemory rather than System.totalMemory gives similar (although offset) results.
Wether or not a soundchannel is played on it, it looks like the Sound Object
cannot be removed from memory.
Please say I'm wrong and tell me why.
Thanks in advanceworks for me in cs5.5:
Loop 1
Before
28780
sound created
28796
After null 0
29380
After null 1
29196
After null 2
29192
After null 3
29192
Loop 2
Before
29192
sound created
29208
After null 0
29196
After null 1
29196
After null 2
29196
After null 3
29196
Loop 3
Before
29196
sound created
29208
After null 0
29196
After null 1
29196
After null 2
29196
After null 3
29192
Loop 4
Before
29192
sound created
29204
After null 0
29192
After null 1
29192
After null 2
29192
After null 3
29192
Loop 5
Before
29192
sound created
29204
After null 0
29192
After null 1
29192
After null 2
29192
After null 3
29192
Loop 6
Before
29192
sound created
29204
After null 0
29192
After null 1
29192
After null 2
29192
After null 3
29192
Loop 7
Before
29196
sound created
29208
After null 0
29196
After null 1
29196
After null 2
29196
After null 3
29196
use a frame loop to repeatedly execute the following and verify no memory leak:
var loops:int;
loops++;
if(loops>6){
stop();
} else if(loops==1) {
var s:String = "";
s+="Loop "+loops+"\n";
s+="Before\n";
s+=System.totalMemory/1024+"\n";
var sound:Sound = new SongScene8();
s+="sound created\n";
s+=System.totalMemory/1024+"\n";
var n:int;
clearF();
function clearF():void {
n=0;
sound=null;
this.addEventListener(Event.ENTER_FRAME,f);
function f(e:Event):void {
System.gc();
s+="After null "+n+"\n";
s+=System.totalMemory/1024+"\n";
n++;
if (n>3) {
this.removeEventListener(Event.ENTER_FRAME,f);
s+="_________________\n";
if(loops>6){
trace(s); -
AS3 URLRequest object properties
I am scanning in a very old book as jpgs using the
convention, "page_001.jpg thru page_110.jpg. Because there are so
many pages, I am using the URLRequest to go get them one at a time.
Is there a way you can get at the URLRequest value which would give
me the jpg's name? I want to use a forward and backward button to
allow the user to flip back and forth between pages so I'll need to
loop thru them to get the next jpg.
Is there another way to do this if I cannot use the
URLRequest's value? How do you load jpgs into Flash w/o importing
them in and be able to continue loading them by their file name?
Kimyou're welcome.
-
Any free software for obfuscating or encrypting as3 code?
Hi, I'm looking for this software for 0€ but so far I just see pay-version ones.
At least I'd like some link with algorithms or something for developing obfuscators by myself.
thanks!I don't know any freeware you could use, but if you Google 'code obfuscation techniques' you will find many articles on the subject.
-
Encrypt a column in a oracle table
Hello all,
is it possible to Encrypt and Decrypt a column in a Oracle table. And if possible which method can we use..
Thanks & Regards
Pratik Lakhpatwala
Jr Oracle DBAPratik.L wrote:
Thank you Sir,
I tried the link you gave me but while creating the table its giving me the following error
ERROR at line 4:
ORA-28336: cannot encrypt SYS owned objects
Thanks & Regards
Pratik Lakhpatwala
Jr Oracle DBA
ORA-28336: cannot encrypt SYS owned objects
Cause: An attempt was made to encrypt columns in a table owned by SYS.
Action: none
You can't encrypt tables owner by the user SYS -
TLFTextField and AS3 / CS5
Background:
I could not make a purely AS3 TextFlow object display text in the same way as a TLFTextField object in the library, even though the settings appeared to be the same (checked using the library xml file in the fla/zip). (The spacing between letters was not kerned in the same way.)
Therefore I changed tack and attempted to use a library object and update it with AS3. However, I feel that the TLF documentation is somewhat lacking, so I am sharing my findings, simple though they may seem to pros. The text was used for buttons, so I only needed to consider one paragraph with only one span.
What I worked out
It has taken me a long time, but I have finally worked out how to access the elements in a TLFTextField object in the library.
//create an instance of the 'tlfContainer' symbol containing the TLFTextField object, with the Instance name 'tlfTextField' and 'default' as the text.
var container:tlfContainer = new tlfContainer;
//target the textFlow of the object
var flow:TextFlow = container.tlfTextField.textFlow;
//get the first (and only) child of the TextFlow, which is a ParagraphElement
var paragraphElement:ParagraphElement = flow.getChildAt(0) as ParagraphElement;
//get the first (and only) child of the ParagraphElement, which is a SpanElement
var span:SpanElement = paragraphElement.getChildAt(0) as SpanElement;
Now I can change the text (eg span.text = "new text";) and format the text (eg paragraphElement.direction = "rtl") AND have it display correctly!
Questions:
1. Is something like this documented somewhere that I have missed?
2. Is there an easier way to do this, ie directly access elements? Using getParagraph() gave a null, even though the above worked..
3. Why should a dynamically generated TextFlow look different to a TLFTextField object?It took me a while to find it when I saw an example of code a couple of days ago.
It basically means a variable number of comma delimited paramaters. From online doc's:
Statements, Keywords & Directives
Definition keywords
... (rest) parameter
Specifies that a function will accept any number of comma-delimited arguments.
I am trying to find a coding example or two to model my own.
Thanks,
Jim -
Resizing TextField objects problem
Hi there,
I am writing an AS3.0 application, which arranges TextField
objects in a grid
format. These may be of variable width and height, so each
row/column works
out how large it needs to be, by polling its contents for the
largest
width/height. (I was unable to find a pure AS3.0 object that
does this sort of
thing, but that's another story). The TextFields update over
time, so their
widths/heights change, and the grid dimensions with it. This
is all working
fine.
However, what I am having a problem with, is I am trying to
make the
TextFields resize to fill the area of their "Cell" in the
grid, if they are too
small. This is because I am doing some highlighting with
background/foreground
colours, and want the effect to fill the whole cell. So for
instance, if the
Textfields in a column are 100, 100, 50 and 100 pixels wide,
I want to make the
50-pixel wide one 100 pixels wide as well, so if its
background colour changes,
it affects the same width as the rest of them and looks right
If I try to force the TextField's width property, it doesn't
cooperate very
well - sometimes it simply ignores it (I guess the rendering
tells it what to
do). I currently have the autoSize feature turned to
TextFieldAutoSize.LEFT so
it trims off from the default (100,100) dimension. I
understand this may be
what is interfering with the resizing I am trying to do.
However, with
autoSize set to TextFieldAutoSize.NONE, it seems to resize
the entire text
object (eg if it is 10 pixels wide, resizing it to 80 pixels
wide makes the
text 8 times bigger!!), which is obviously not what I'm
after.
I'm trying to do this TextField resize so I can keep all the
highlight
formatting in one place (ie I can just set the TextField
forground and
background, rather than its foreground and call some other
object to set the
background). Does anyone have any tips how I can accomplish
this resizing of
the TextFields to fit in the grid structure?
Thanks very much in advance! :)
DavidWhi peterent, thanks for getting back to me.
the issue isn't the grid layout (i implemented my own because
i wanted to have specific control over some of its layout
abilities, and also, this is a pure AS3 project, without flex
elements, to keep the file size tiny), but expanding the contents
to fit the cell it's given, so they all line up correctly within
it.
i think i've got it - i implemented getter/setter methods for
a variable in an interface for the text fields i mentioned, which
then fires off events to control the highlighting. so i'm going to
create a displayobjectcontainer which both contains the textfield
and draws the background, but implements the interface, so i won't
have to change the rest of the surrounding code :)
if you have any suggestions for neater ways to control that
issue of filling grid cells, with variable size contents, do let me
know. but thanks!
DavidW -
AS3 alternatives to _global variable path?
Hi, through out a very old complicated fla there are buttons which set variables using _global paths
such as:
function menu1_2(Event:MouseEvent) {
global.mode = "hide_hotbox";
MovieClip(this).gotoAndStop("stage_1_b");
How can I make the variable "hide_hotbox" and others like it accessible and changeable from any movie clip -- whether they be nested in other movie clips or on the main timeline, etc?
Thank you...(wits end)...extremely appreciatedyes I will
and post the code here
in the meantime, I'm also going to ask as a side note on future threads: how can one keep up with scripting trends and expected actionscript changes?
I just have one, very, very complicated website -- and otherwise work in CG, etc. most of my time...a few times a year I make graphical changes to this website but updating it from AS 1 to AS 2 and now AS 3 has been a heart stopping nightmare...I'm sure, absolutely confident, if and when I have a family and children I just will not be able to keep up this site...I plan to scale it down, but, how can one be sure to write code now which has a chance of lasting? Are there trends and viewpoints within the Actionscript community which one could use to anticipate changes in AS 4. I would have put my code on timelines rather than buttons and named all the buttons when I originally created the site in AS 1 if I had known I'd have to refamiliarize myself with the guts and bolts of this monster horrific site once again. When I am senial, this site is dead...it is taking every neuron I have.
sources used for research thus far:
http://www.uza.lt/codex/as3-global-object/
most elegant:
http://www.kirupa.com/forum/showthread.php?p=2110832
clear:
http://www.websitemediaplayers.com/blog/global-variables-as3/
thanks again -
Tips or Improvements for my Bitlocker Encryption Test Script
Hi Guys,
I just finished a little script to check if a drive is encrypted with Bitlocker. I wanted to post it here to see if anyone had some constructive criticism.
Here you go:
$computer = import-csv C:\scripts\bitlock3.csv
$namespace = "root\CIMV2\Security\MicrosoftVolumeEncryption"
Foreach($line in $computer){
$a=GWmi -class Win32_EncryptableVolume -computername $line.comp -namespace $namespace
$BitStat=$a.ProtectionStatus
If ($bitstat -eq 1) {Write-host $line.comp "is encrypted"}
Else {Write-host $line.comp "is NOT encrypted"}You're very welcome.
This adjustment removes all Write-Output statements and replaces them with a hashtable of the computer name and encryption status. Objects are created from those hashtables, they're then sorted by status to have 'NOT Encrypted' appear at the top of the output
CSV, and then sorted by computer name (just a habit of mine):
$namespace = 'root\cimv2\Security\MicrosoftVolumeEncryption'
Import-Csv C:\Scripts\bitlock3.csv | ForEach-Object {
$computerName = $_
try {
$status = Get-WmiObject -Class Win32_EncryptableVolume -ComputerName $computerName -Namespace $namespace -ErrorAction Stop
if ($status.ProtectionStatus -eq 1) {
$props = @{
ComputerName = $computerName
Status = 'Encrypted'
} else {
$props = @{
ComputerName = $computerName
Status = 'NOT Encrypted'
} catch {
$props = @{
ComputerName = $computerName
Status = "ERROR - $_"
New-Object PsObject -Property $props
} | Sort Status -Descending | Sort Name | Export-Csv .\bitlockerStatus.csv -NoTypeInformation
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing) -
Writing a function to that sorts any object
I am trying to write a function that sorts any type of array of objects. For example, I want to call
NewArray = exampleclass.sort(ObjectOfAnyType).
The sort function has to return a new array. I have run into two errors, however.
Error #1
as3.java [21:1] cannot resolve symbol
symbol : variable Object
location: class as3
if (Object instanceof Comparable)
^
Error #2
as3.java [25:1] incompatible types
found : java.lang.Object
required: java.lang.Object[]
Object [] rtn = obj.clone();
*** Below is my source code ***
import java.*;
public class as3 {
/** Creates new as3 */
public static Object sort(Object [] obj)
if (Object instanceof Comparable)
if (Object instanceof Cloneable)
Object [] rtn = obj.clone();
for (int i = 0; i<obj.length-1; i++)
for (int j=i+1; j<obj.length; j++)
if (rtn.compareTo(rtn[j]) == 1)
Object [] tmp = rtn[i];
rtn[i] = obj[j];
rtn[j] = tmp;
else
throw new ObjectIsNotComparableException("Object not comparable");
Any help appreciated. Thanks!Changing from "Object" to the name "obj" fixed the
statement:
if (obj instanceof Cloneable) but not if (obj
instanceof Comparable).
I don't know what's causing this one yet... worry about that in a sec
I am also getting one new error now:
as3.java [28:1] cannot resolve symbol
symbol : method compareTo (java.lang.Object)
location: class java.lang.Object
if (rtn[ i].compareTo(rtn[j])
This one is because rtn[ i] (and rtn[j]) is an Object, which has no method compareTo. Try casting it to a Comparable...
I think I just worked out why it let you go with the cloneable, but not with the comparable. obj is an array, and sure an array is cloneable, but how could you compare an array? Sure you can compare the elements in the array... So either check if obj[0] instanceof Comparable, or drop the test all together.
Note: checking obj[0] will give you an exception if someone asks you to sort an array of 0 length (no elements)
Hope this helps,
Radish21
Maybe you are looking for
-
Locking and blocking - puzzlement.
I have a table - relatively simple CREATE TABLE Sysstat M_Time DATE, Usr_pct NUMBER(10, 0), Sys_pct NUMBER(10, 0), <a few more NUMBER(10, 0) deleted... CONSTRAINT Sysstat_PK PRIMARY KEY (M_Time) );Issue (From an SQLPlus session) the command
-
Photoshop CC: Save for Web- The file or directory could not be found.
I've seen similar questions but have not found a solution that works. So far, these are the steps I have taken with a MacBook Pro OSX 10.9.2, 16G, SSD: 1. Uninstall and re-installed both Photoshop CC and inDesign CC. (Figured there were shared li
-
What's the maximum number of Apple TVs that can be displayed in the AirPlay list?
We have 50 conference rooms all on the same network and are considering equiping each one with an Apple TV for AirPlay Mirroring our iPad 2s to the rooms projector, or TV. What is the maximum number of Apple TVs that can be displayed in the AirPlay m
-
How to load sets from R3 to BW
In R3, we have many report painter reports which were written using various account sets and cost center sets, etc. These sets were created in t-code GS01, and they can contain one single node or multiple nodes. We are activating various BW cubes
-
Installing Windows 7 on a new partition
I have a Satellite P300-19F and it came with Win Vista. I am trying to install Win 7 on a new disk volume, but I do not have the Toshiba programs that came with the equipment (software for webcam, DVD, etc). Where can I download all that software of