Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ ¹ ² ³ °
 

You are not logged in. #1 20080130 04:43:38
Oneway function; VBCode:For x = 0 To 1 CompiledString = CompiledString & Password(x).Text Next CompiledString = CompiledString & UserName.Text For x = 1 To Len(CompiledString) Output = Output & Int(Asc(Mid(CompiledString, x, 1)) + Asc(Mid(CompiledString, Int(((x + Sqr(Len(Output))) Mod (Len(CompiledString)  1)) + 1), 1))) Next I will give high praise to anyone who thinks they know how to retrieve the original information and actually can. Code:UserName.text = afoiadfjanwief Password(0).Text = wedraixdn Password(1).Text = rhescaiufenxe Output = 21320613321521521313720022519321622014020622920020522023114221614781235202229213137230211142153220216199211202222221210230215201203226196197207223199211229225203216203211219194205222206211214220220200199224218202224217206217202221219201201217196207224222203212212152217201203210216206212207214198224203209206134 Code:UserName.text = aerjxosadmxxicwwmdxMALW Password(0).Text = adxneuXddwriox Password(1).Text = XAwjixnckefexnIXern Output = 21320613321521521313720022519321622014020622920020522023114221614781235202229213137230211142153220216199211202222221210230215201203226196197207223199211229225203216203211219194205222206211214220220200199224218202224217206217202221219201201217196207224222203203207220221207203199205185165221212202230229204208204198220230183189218202210185166233226216235207199216221222206219229192197221191175173188211206240221216214188209185239211204239229208207221179166196197170201234220198218202206208176234203205229230219206220221210220230150153177201207197221224207208211203162219215225240215198226220211201240187153177201207197221224207237199215185165228226225225229218216201222178185186160185201234220198218202206185230221202220219219227206201220239219173208178179186188211206240221216214188209208185224205224239219199227178178188217210193198202231198197201233220225222235185165228225240215198226220211201240187138164188211210217211215223208215197219223225231225187184238215205240187164183188199201240220190176201214229211206225226208176234203205229230219212200221220219173208178179186184198214226230212232185200209239234210210239207165239183170196221201139217206202152209184197213219218198215198210225143220212132225221235221131229230141149239178165190184 What gave Code:Output = 1811291842231331601942231331901811982221911291831291921982151981692092151401201292322052191872062231402101551412332202062296421515764156213212213233232205215133212139147172125199213206224148181218228215199218147227172207225216185205140184149211230198235116171219211142191208211 Last edited by Laterally Speaking (20080130 04:57:48) "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #2 20080130 05:57:43
Re: Oneway function; VBmy god VB is more horrible a language than i ever believed, how can you bear working with it? Last edited by lucadeltodesco (20080130 05:58:14) The Beginning Of All Things To End. The End Of All Things To Come. #3 20080130 06:50:32
Re: Oneway function; VBstring & string > puts the two strings together, in the order they are typed, to form one longer string Last edited by Laterally Speaking (20080130 07:21:42) "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #4 20080130 07:15:08
Re: Oneway function; VBThe "string concatenation operator" is one of my main sources of bugs: "The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  Leon M. Lederman #5 20080130 07:24:36
Re: Oneway function; VBIn VB, if the strings are numbers, the string + string adds the numbers, but, if they aren't numbers, it "concatenates" them. Last edited by Laterally Speaking (20080130 07:27:45) "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #6 20080130 11:22:11
Re: Oneway function; VBVB.net is much better than VB. Instead of buying it, you might like to try "SharpDevelop": http://www.icsharpcode.net/OpenSource/SD/ andlet us know if it is any good. "The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  Leon M. Lederman #7 20080130 22:49:10
Re: Oneway function; VBI personally like VB, but I mainly use VBA with Excel. I'll have a go at this later. I think it's doable from a glance, but I'll need to play with it. Trillian: Five to one against and falling. Four to one against and falling… Three to one, two, one. Probability factor of one to one. We have normality. I repeat, we have normality. Anything you still can’t cope with is therefore your own problem. #8 20080130 22:58:02
Re: Oneway function; VBUnless I made some huge mistake, which is possible, the only way to get back to the original string is the good ol' bruteforce method. "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #9 20080130 23:40:32
Re: Oneway function; VBNo, it's fine the way you've done it. Trillian: Five to one against and falling. Four to one against and falling… Three to one, two, one. Probability factor of one to one. We have normality. I repeat, we have normality. Anything you still can’t cope with is therefore your own problem. #10 20080131 01:30:53
Re: Oneway function; VBAll right; I'll simplify the challenge: could you simply deduce the concatenated string from the end result? "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #11 20080131 03:13:42
Re: Oneway function; VBCan you double check the output you gave? I'm assuming that the words are alpha only with upper and lower case. Examples I've tried Trillian: Five to one against and falling. Four to one against and falling… Three to one, two, one. Probability factor of one to one. We have normality. I repeat, we have normality. Anything you still can’t cope with is therefore your own problem. #12 20080131 04:14:58
Re: Oneway function; VBThe entered strings can contain any ASCII characters, as well as numbers. It seems that I did forget the following: Code:Dim CompiledString As String Dim Output As String Dim x As Integer "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #13 20080131 04:29:47
Re: Oneway function; VBCurses! Well that certainly makes it much harder to discern the length of the original string. It might still be doable, but it would require Trillian: Five to one against and falling. Four to one against and falling… Three to one, two, one. Probability factor of one to one. We have normality. I repeat, we have normality. Anything you still can’t cope with is therefore your own problem. #14 20080131 04:40:54
Re: Oneway function; VBNah. You can always bruteforce it, but it takes a lot longer. "Knowledge is directly proportional to the amount of equipment ruined." "This woman painted a picture of me; she was clearly a psychopath" #15 20080131 20:31:05
Re: Oneway function; VBI meant an 'intelligent' method but you're quite right, anyway. I was reading the ASC(...MOD...) one incorrectly. Trillian: Five to one against and falling. Four to one against and falling… Three to one, two, one. Probability factor of one to one. We have normality. I repeat, we have normality. Anything you still can’t cope with is therefore your own problem. 