PDA

View Full Version : String encoding



bombsledder
January 15th, 2006, 01:30 AM
well i havent really seen anyone work with strings and someone already used the idea i was gonna use fireworks =( but o'well what it does is encodes and string
and can decode i think the correct term is encrypt but i used encode well here we go


function buildInterface():Void {
_root.createEmptyMovieClip("holder", getNextHighestDepth(), {_x:252.9, _y:147.7}), _root.holder.createTextField("change", getNextHighestDepth(), 252.9, 147.7, 127, 22.1), holder.change.multiline=true, holder.change.html=true, holder.change.htmlText="<u>Change decode or encode</u>";
_root.createEmptyMovieClip("holder2", getNextHighestDepth(), {_x:0, _y:0}), _root.holder2.createTextField("change2", getNextHighestDepth(), 252.9, 167.7, 127, 22.1), holder2.change2.multiline=true, holder2.change2.html=true, holder2.change2.htmlText="<u>Clear textFields</u>";
_root.createTextField("output", getNextHighestDepth(), 62.0, 259.7, 317.9, 228.3), output.multiline=true, output.wordWrap=true;
_root.createTextField("mytext", getNextHighestDepth(), 50.9, 10, 350, 200.1), mytext.multiline=true, mytext.wordWrap=true, mytext.text="First off to encode the text type the text in input textbox and press the orange square"+newline+"to switch from encode mode to decode mode just press the text labeled ~change decode or encode~"+newline+"now if you happen to start off by decoding a string before encoding you will run into some problems but ya! pretty cool design of random wierd letters i do think so myself =) enjoy!!", mytext.selectable=false;
_root.createTextField("usertext", getNextHighestDepth(), 67.0, 193.7, 192.9, 20.1), usertext.type="input", usertext.border=true, usertext.antiAliasType="advanced", usertext.text="type text here", _root.createTextField("decoder", getNextHighestDepth(), 252.9, 125.7, 48, 20.1), decoder.text="encode", decoder.selectable=false, decoder.autoSize=true, decoder.textColor=0xFF9933;
_root.createEmptyMovieClip("enter", getNextHighestDepth(), {_x:273.3, _y:198.3}), _root.enter.moveTo(350, 350), _root.enter.beginFill(0xFF9933, 100), _root.enter.lineTo(350, 350), _root.enter.lineTo(350, 400), _root.enter.lineTo(400, 400), _root.enter.lineTo(400, 350);
_root.holder.onRelease = function():Void {
_root.decoder.text == "encode" ? _root.decoder.text="decode" : _root.decoder.text="encode";
};
_root.holder2.onRelease = function():Void {
_root.output.text = "";
};
_root.enter.onRelease = function():Void {
for (i=0; i<_root.usertext.text.length; i++) {
if (_root.decoder.text == "decode") {
str=_root.usertext.text.toString(), temp=Number(str.charCodeAt(i)), temp=temp/2, temp2=String.fromCharCode(temp), _root.output.text += temp2;
} else if (_root.decoder.text == "encode") {
str=_root.usertext.text.toString(), temp=Number(str.charCodeAt(i)), temp=temp*2, temp2=String.fromCharCode(temp), _root.output.text += temp2;
}
}
_root.output.text += newline, _root.usertext.text="";
};
}
buildInterface();

Seb Hughes
January 15th, 2006, 05:35 AM
Dont quite get the point,

hybrid101
January 15th, 2006, 06:02 AM
cool decoder/encoder...might be useful for secret messages... èÐÒæ@Òæ@àäÊèèò@ÆÞÞØB

sed|thh
January 15th, 2006, 06:22 AM
good way for encoding secret data in an unusual way! nice work

Sammo
January 15th, 2006, 06:28 AM
èÐÒæ@Òæ@àäÊèèò@ÆÞÞØB

òÊæ@Òè@ÒæB

bombsledder
January 15th, 2006, 01:46 PM
Dont quite get the point,

the point is to hide secret codes so nobody can understand them or you can use it with php/mysql to encode the passwords...but i think md5 would work but hey =)

Smily
January 15th, 2006, 02:03 PM
ØÞØX@ÂÜÈ@ÄÞÚÄæØÊÈÈÊät@ÚÈj@Òæ@ÜÞè@äÊìÊäæÂÄØÊ@Z@òÞê@ ÆÂÜNè@ÈÊÆÞÈÊ@ÒèX@èÐÒæ@ÞÜÊ@Òæ@t

:D

bombsledder
January 15th, 2006, 05:20 PM
lol, and bombsledder: md5 is not reversable - you can't decode it, this one is :

o.O never knew that? and this can easily be made to not be able to decode it back unless you know the formula to change the letters =S

Sammo
January 15th, 2006, 05:34 PM
lol, and bombsledder: md5 is not reversable - you can't decode it, this one is :

o.O never knew that? and this can easily be made to not be able to decode it back unless you know the formula to change the letters =S
Good ol' brute force code cracking works everytime!

bombsledder
January 15th, 2006, 07:01 PM
lol, i love that program..hard to find thought o.O looked for it about a month ago and took me about an hour to find it on google

NiñoScript
January 16th, 2006, 11:03 AM
you can encode things a lot of times :P
and it works to decode it, although after several times some things are lost or changed... i think thats normal couse we cant paste every type of letter here...
èÐÒæ@Òæ@äÊÂØØò@ÌêÜB@ǤƼǔ€ƌƄƸ€ƬƔƔǀ€ƐƔƌƼƐƤƸƜ°€̨̠̘͸̨̠Ā ͈ΠĀ͸Ͱ̨̘Āͨ͸ΐ̨

isnt that char cool? -->☃

Pattt
January 16th, 2006, 05:00 PM
Really cool! :)

bombsledder
January 16th, 2006, 07:46 PM
i dunno but if you try to decode something that hasnt been encoded first you will have some problems and if you try to encode something that has been encoded, it will be hard to get it back

phorte
January 16th, 2006, 08:02 PM
I made an encrypting app in flash a while back that used the Vigenère cipher. Very simple, and very cool. Nice work :D

Sammo, u said Brute Force works everytime. There is one form of cipher where it wont work. Its called a One Time Pad. It is similar to the Vigenère cipher but uses a random key the length of the whole message. Therefore if u were to try every possible key then u create every possible message, and you would be unable to determine which message is the correct message. Just a little somtin i read in a book once.. :)

ElectricGrandpa
January 17th, 2006, 12:22 AM
ঠ༠ЀවఠචಠЀഠ๠Ѐචఠ຀຀

bombsledder
January 17th, 2006, 03:58 PM
My name is matt >.>

you encoded it a bunch of times =)