Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!

# Problem with Linear Transformation method in Cipher program

Christina Arsenault
Greenhorn
Posts: 2
We have to write a cipher program for an assignment. Here's the code for it, it has been documented. The input we are using is {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160}. The output is meant to be {127,178,145,50,74,59,90,63,36,168,182,106,211,94,8,188} after two rounds. We are not getting the right output and we have determined that the flaw in our program occurs in the linear transformation method (lines 179-213). We've been looking at this program for hours and are having problems finding an error. If someone could take a look at it, we would love them forever!

Here's the code:

marc weber
Sheriff
Posts: 11343
Originally posted by Christina Arsenault:
... We are not getting the right output and we have determined that the flaw in our program occurs in the linear transformation method (lines 179-213)...

How are you testing this method?

In other words, what exactly is the "second part of the linear transformation" supposed to do?
[ October 23, 2007: Message edited by: marc weber ]

 Consider Paul's rocket mass heater.