Java :: Get Encrypt And Decrypt String With Defined Salt?
Dec 16, 2009
I want tp encrypt and decrypt string, with defined salt. But the result must be same if the code run in java and adobe flex.The main goal is: the app in adobe flex will be generate a string that can be decrypt in server using java.Try to 'Secret Key' Tab. I want to use AES Encryption, 'CBC' or 'PKCS5'.
var k:String = "1234567890123456";
var kdata:ByteArray = Hex.toArray(k);
var txt:String = "hello";
var data:ByteArray = Hex.toArray(Hex.fromString(txt));;
[code]....
View 2 Replies
Similar Posts:
Feb 25, 2010
I am developing my application in flex and JSP, so when I am passing values through HTTP Service Post method with request object but these values are tracing and modifying by testing team so I am planning to encrypt values in flex and decrypt it in jsp.so is there any algorithms like SHA or MD5 more secure algorithms,
[Code]...
View 4 Replies
Jul 22, 2010
I need to send data from flash to the server, so I'm looking for a flash ActionScript 3.0 script that will encrypt a text and a C# .net script that decrypt the text.
View 1 Replies
Jun 16, 2011
I would like to implement some security in some of the Flash/PHP applications that I have. I have some Flash apps that communicate with PHP files, and the PHP is sending the data as get string (E.g.: name=John&sname=Doe&age=24&balance=12.4). Instead of all these variables, I would like it to send a single variable (E.g.: flashvar=jr9afgaw9-fg90agfawf7gw) that would contain those values, so then Flash would decrypt the string and get the real and useful vars.
I want to encrypt this using a private key and use the same private key to decrypt this inside Flash. If someone would want to decode the message PHP sends, he would have to decompile the flash file and find the private key I'm using in Flash to decode the message and then decode it. The reason I posted here is because I want to use an encryption algorithm that allows only the use of a private key for encryption/decryption.
View 3 Replies
Oct 14, 2011
I'm working on an Windows application(created in .NET) which one of its functions is to play local FLVs using SWF components. Now I need to create an encryption application to make sure those FLVs cannot be played freely, only the SWF player will know how to decrypt that file(using a key received from .NET app). I was thinking of creating an Air app to encode my flvs (maybe ByteArray class?), using some algorithm to shuffle/unshuffle characters based in a key string. My main need is how to encode/decode a file using Air/Flash. I tried some times, just trying to load a FLV, convert to ByteArray, then save the new FLV, but this new FLV won't play. Opening into Notepad++, I noticed the file have a few characters before it's FLV header.
View 2 Replies
Mar 23, 2012
I found something about encrypt and decrypt for AS3 [URL] but the document is not very clearly, how can I do encrypt/decrypt in as3? BTW, what is the suffix of algorithms like ecb, cbc, cfb, cfb8, ofb, what's the means. Which should I use?
View 1 Replies
Nov 13, 2009
I need encrypt data score from game flash and send it to ASP page, in ASP page, it will decrypt and update Database.
View 5 Replies
Feb 28, 2012
I was using as3Crypto with no probs [URL] but it produces a string which includes equal (and probably other URL Query unsafe characters). Is there a way to encrypt like this? Current code below:
[Code]...
View 1 Replies
Jan 12, 2010
I have a swf file which contains static text.... Now i want to encrypt and decrypt the static text available inside the output swf file.. Is it possible to do in AS 2.0 .... If it is means then provide some idea to perform these operations
View 8 Replies
Apr 8, 2011
I need to be able to transmit data from a Flash browser application to a PHP file on a web server, both securing and validating the data whilst and at the same time trying to prevent unauthorised creation of the message. (I want to try and ensure that the message comes from the application, not a user sending a message via another means).
In a C++ application I would Salt the data, and send the hash of the data along with it, and then validate the hash against the data to ensure integrity and source.However, in Flash (& Java), applications can be decompiled so that the source code is viewable. So if I used this method, someone could (relatively) easily find the salt, and then create a 'valid' message of their own to send outside of the application.
Is there any way I can 'hide' this salt code to help secure the transmission? Yes, I know there are code obfuscators, but they don't fully hide the code, just add another layer.Or is there another method entirely that could be used to transmit data and validate the source & content at the PHP end?
View 3 Replies
Jul 30, 2011
how to grab an object like a salt shaker and pour grains of salt on the plate? I have built a small flash file that has the mouse move the salt shaker on a angle, but I don't know how to make salt animate out on the plate - I don't know how to create a "scatter" effect and leave the salt particles on the plate.
View 1 Replies
Jan 23, 2003
I am sending a string to asp from flash that looks like this;
[CODE].....
The problem is when asp (probably php too) reads this string, it reads it like this
[CODE]....
Now this sucks, is there a way to encrypt my flash string so asp will read the string corectly? I know asp is url encoding the flash string, but this bit of info does not seem to help.
View 14 Replies
Jan 23, 2012
We are trying to create a sqlite db file using java on the server, and encrypt it.Then we send the encrypted db file to a client's pc, which has an Adobe Air desktop app running.The air app then needs to be able to open/read-from the encrypted db file (client is read-only).We are using java 1.6, flex/actionscript 4.5, and Air 3.1.We can create the sqlite db file on the server and send it to the client, and it can be read by the client without issues, when we do not encrypt it.But we are having trouble with the encryption part. We've read quite a lot of documentation about Actionscript's ability to open encrypted sqlite files using AES + CCM (URL...).And we're trying to use java's crypto package to encrypt the sqlite db file.The encryption is important because we don't want the client to be able to open the sqlite db file with any sqlite browser, only with our Air application.
View 1 Replies
Jan 31, 2012
I have created a variable that when defined as String can end up containing what I need. It just doesnt do what I need it to do.So I can trace out a1Tap=containa1_ mc.square_ mc. saysquare_btn.That is what I want a1Tap to contain but it isn;t the right kind of data.[code]How do I set up and use the a1Tap variable so that a) it contains containa1_ mc. square_ mc.saysquare_btn (as it currently does)in a way that it work as a path name for an event listener?
View 8 Replies
Aug 3, 2011
I've got a string which, in run-time, contains the name of a class that I want to instantiate. I read suggestions to use
flash.utils.getDefinitionByName():
var myClass:Class = getDefinitionByName("package.className") as Class;
var myInstance:* = new myClass();
However, that gives me the following error:
[Fault] exception, information=ReferenceError: Error #1065: Variable className is not defined.
View 1 Replies
Jul 28, 2011
I have built a small flash file that has the mouse move the salt shaker on a angle, but I don't know how to make salt animate out on the plate
View 0 Replies
Feb 29, 2012
am trying to split the string in flex,but i can't to separate correctly
private var image_path:String = "http://pvm4.yyy.in/sample-31/demo/img0.jpg";
I want to split the number 0 so am trying this code
image_path.substring(image_path.lastIndexOf("/img"));
but am getting img0.jpg i need 0 only how to split this?
View 2 Replies
Feb 9, 2010
I am using flex builder 3.2, Action Script 3 and develop for Flash Player 10 and am quite new to it. when I call a method of a self defined class, I get the 1061 error (not defined). But the class and the method exist and are public, so what the hell am I doing wrong? Flash Builder is even offering me this method in the auto-completion, so at least the builder knows it... I have already tried cleaning the project (as this is the common source of strange errors when working with java/eclipse),
edit: solved... The problem was that a package had the same name as the variable I used for the class. Very strange error message, thumbs down for this .
View 0 Replies
Aug 9, 2010
Say you have a web application that has a lot of business rules built around if-then comparison of String constants. These are used on both client-side and backend code, and at the moment are hard-coded badly throughout both places with lots of duplication and sometimes errors. What's a sensible way to refactor them out? Unfortunately, in most cases they must exist as using polymorphism would be much more hideous. Anything specific for flex/java? Is there an easy way to keep all those constants in one place and compile it into both client and server code?
Edit: I'm really looking for a way to share string constants between flex and java with compile-time checking of everything.
View 3 Replies
Oct 28, 2011
So I'm making my own networking protocol for a online game, to save space each message (sent over TCP) is given a ID which is a short, 2 bytes, all messages sent from the server to the client and vice versa are strings, how can I convert a short to a string in java in just 2 bytes (characters)? I want to be able to convert a short int into 2 characters, so that I can send the short over the network in a string format in just 2 bytes and decode it back into a short on the other side (in actionscript 3). A character can hold 256 possible values right? So 256*256=65,536 which is the size of a unsigned short int!
Here's what I've got so far:
public static String toCode(int c){
if(c <= 255 ){
return Character.toString((char)c);
}else{
return null;
}}
public static int fromCode(String c){
return ((int)c.charAt(0));//Return the character code of the send string, 1 char only
}
This can turn a int into a single character which can be sent over the network, now I just need to have it use 2 characters and it can do up to a short.
View 3 Replies
May 27, 2009
is it possible to trace/get a variable that's defined in a "main" .swf, from an external SWF that has been loaded onto the "main" SWF?
for example, if i have 2 SWF files called "main.swf" and "sub_page.swf"..
the code in "main.swf" is:
Code: Select all // create and define a variable
var currentInformation:String;
[code]...
i tried putting "Object(root)" before "currentInformation" and it still wont work...
View 2 Replies
Feb 21, 2012
I have an image file, in *.tif format, that looks like this: As you can see it contains an image along with a lot of text. Is there any way to read my .tif image and extract the text content into a String ?
View 1 Replies
Jul 9, 2007
Since I downloaded all kinds of swf crackers to test the encryptor before I buy it, I can't see how they did it. I downloaded all swf crackers again, their latest versions, and still they can't rebuild the fla from my obfuscated swf.So there must be another way! I want to know how they do it, so I can prevent in the future. Apparently, a obfuscation alone isn't enough...
View 14 Replies
Jan 11, 2010
I have encrypted my data using RSA in Asp.net. Now i need to use the data in flex by decrypting it. Could any one guide me how to decrypt the data in Flex which was encrypted in .Net using RSA.
View 1 Replies
Dec 20, 2011
can I de-crpypt a streaming file, (assuming that i encrpyting this file on the server side during upload) , in flex before it being processed for playing.
View 1 Replies
Jul 14, 2009
I'm using as3corelib's MD5 class to encrypt data sent from a flash form.. so far so good... I can validate a user's login and password , no problems the thing is I need to decrypt a value that's stored in the database with an md5 encryption and is sent by the php script to the flash app.
View 2 Replies
Feb 4, 2009
I want to have a SWF file that can show images that encrypted and only swf can
show them! but i don't know how can i Encrypt images and load them into flash
View 9 Replies
Jan 4, 2011
I am writing a game where positions of an object are being exchanged between the two flash clients through a java server. The secnario goes simply like this:
PlayerA ---> Server : "Position X + Position Y+
"
Server ---> PlayerB: "Position X + Position Y+
"
and it works both ways of course.the problem here is that on my computer where i use "localhost" everything is fine and the data is exchanged seamlessly .. when I loaded the server on a remote host the message received strangely turns into something like "Position X + NaN" (i.e. the y position is wrongly parsed by the server), what is weird even more, is that sometimes, the message gets parsed correctly..the server is wrote in java and it is exactly the same source code that works on my machine that fails over the internet
View 1 Replies
Sep 22, 2008
I have recently created my very first game. How should I go about protecting my work? Is there any freeware encryption available?
View 3 Replies
Aug 4, 2009
I am now thinking of encrypting the flv file . is there any way to do this by flex? do you have some tutorial of example to do encrypt the flv file.
View 2 Replies