Masking - UDF
Posted: Tue Mar 17, 2015 5:38 pm
Hi,
I am planning to write a function, to mask the data in the table. The masking should be reversible. So I tried a logic in C program. Please find attached the C program.
This program, shuffles the position of data
The Sample Output of the C program shuffle.c
$ ./1.out vignesh
The argument supplied is vignesh
The value of argv[1] is vignesh
The value of arr is vignesh
The value of arr is ihvnsge
By just changing a for loop in the same code, I can bring back the shuffled word to the correct word
Please find the sample output of the C reshuffle.c This program is also attached.
infinity@infinity-PC:~$ ./reshuffle.out ihvnsge
The argument supplied is ihvnsge
The value of argv[1] is ihvnsge
The value of arr is ihvnsge
The value of arr is vignesh
I want to know , whether these two programs can be written as user defined function. If so , someone can guide me how to do that.
Please help needed.
I am planning to write a function, to mask the data in the table. The masking should be reversible. So I tried a logic in C program. Please find attached the C program.
This program, shuffles the position of data
The Sample Output of the C program shuffle.c
$ ./1.out vignesh
The argument supplied is vignesh
The value of argv[1] is vignesh
The value of arr is vignesh
The value of arr is ihvnsge
By just changing a for loop in the same code, I can bring back the shuffled word to the correct word
Please find the sample output of the C reshuffle.c This program is also attached.
infinity@infinity-PC:~$ ./reshuffle.out ihvnsge
The argument supplied is ihvnsge
The value of argv[1] is ihvnsge
The value of arr is ihvnsge
The value of arr is vignesh
I want to know , whether these two programs can be written as user defined function. If so , someone can guide me how to do that.
Please help needed.