I passed the all the tests for the Enigma Encryption/Decryption, but once submitted validators 4 and 6 fails.
My implementation seems to be correct as endoing+decoding brings the initial message back.
I encountered small issues when parsing parameters so I think my problem comes from inputs.
Edit: my decode function had a small bug in the reverse formula.
Fixed it and got the 100%
i donāt effing get it. and since i canāt see what are the issues with test cases 4 and 6, i have no clue whatās wrong. iām pretty convinced iāve got it right, but i donāt know what the program expects me to do if there are invalid characters. iāve tried returning nothing when there are invalid characters. iāve tried using ToUpper() to make them all uppercase. iāve tried ditching the invalid characters but still process the rest. i dunno! it doesnāt work.
Iām guessing here but invalid characters probably mean that you went past the first or last letter of the rotorā¦ in that case, just remember that youāre trying to match the behavior of something thatās a rotor in real life; a wheel; a circle. What happens when you make a full revolution?
thanks for the suggestion! i have done that already though, thatās why iām stumped! i use mod 26 on the zero-normalized characters. for the decoding, i add 26 first so it doesnāt make a negative result and it cancels out with the mod 26. i mean, if it was faulty, it wouldnāt work with any case.
My code worked the same way and failed the same tests until I did something. Itās a simple thing and it has to do with the size of the original message. I donāt want to completely give it away here but if you still have trouble, PM me and Iāll share it.
thank you, you are damn right. i needed this hint i guess, because it allowed me to finally focus on the + 26 mod thing, lol. i think iām used to solving issues by seeing the erroneous result, and this hidden validators thing prevent me from doing so, but this being a challenge of sort, guess thereās no avoiding it! i really was pissed, lol
Validating every test encode and decode, checking characters outside A-Z during the shift. Mysteriously failing test 8, (encode) and weāve no freaking log or test to see whatās the problem this is annoying.
After some investigation, the only tips i could give is: Care for your (int)char value, some special characters may create some unexpected results and wrong your shift.
Hi iām having trouble with the DECODE process Test #3. In ENCODE, i know i have to apply the Casesar Shift plus 3 rotos in order. But in DECODE what is the secuence?? Do i have to rest the values in Caesar Shift?. Apply rotos in inverse order?
Same issue here. I cannot get test #4 and #6 to pass.
I checked the contraints, have no hard-coded valuesā¦
It is really annoying. I am trying to solve this for quite a while now and nothing works. Really having no error message or return on those tests that fail other than āno hard coded value allowedā is frustrating.
Is there any way I can see what exactly is not passing the tests ?
I am using the java IDE.
Well in decode you do just the opposite.
So if you want to decode letter Y, you look which letter X gives you Y after rotor 3;
Then which letter Z gives you X after rotor 2, and so onā¦