nocturn4l
asked on
(Programming) Inverse Permutation Function with a Secret Key (for cryptography).. I just need help understanding what to do
*full instructions in the attached picture*
I just have to program these two methods (just psuedo code)... but I'm not sure what to do with int[] z.
static char[] encrypt(char[] x, int[] z)
static char[] decrypt(char[] y, int[] z)
If i understand correctly...if I have an array of:
A B C D E
i would return
E D C B A
but i'm not sure what to do with the the Z array.
please help~! due at midnight today
nocturn4l-446009.flv
I just have to program these two methods (just psuedo code)... but I'm not sure what to do with int[] z.
static char[] encrypt(char[] x, int[] z)
static char[] decrypt(char[] y, int[] z)
If i understand correctly...if I have an array of:
A B C D E
i would return
E D C B A
but i'm not sure what to do with the the Z array.
please help~! due at midnight today
nocturn4l-446009.flv
ASKER
think i'm jus retarded... but do you think you can maybe elaborate further what you mean? maybe using an example of the A B C D E example i gave?
ASKER
for example, the encrypt function.. .the A B C D E would be passed into the function through the x array i believe.. but what would be in the z array then?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ah ok i get it, thanks objects. you've helped me in the past many times before. i'll close the question when i finish just incase i have any other questions
so in your loop you would do something like:
Open in new window