Preview

Pt1420 Unit 6 Lab Report

Satisfactory Essays
Open Document
Open Document
288 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Pt1420 Unit 6 Lab Report
Step 1 : To calculate the length of input string and assign variable X.
Step 2 : Each element in input string is converted into ASCII value.
Step 3 : If length of the string is even then the string is equally divided into two parts using the left substring and right substring.
Step 4 : If the length of the string is odd then middle most elements is kept unchanged with left substring and right substring respectively.
Step 5 : Reverse the right substring and then repeat step3 and step4 until the derived two substrings more than 3 elements in each substring.
Step 6 : Break the input string into square matrices of maximum possible size of odd order, minimum being 3x3 and place the remaining elements into
…show more content…
Step 7 : Repeat this step using remainder REM of this step as input string, until there are 9 or more elements in REM.
Step 8 : Then, place the elements in REM into a square matrix of order 3x3.
Step 9 : Initialize the unoccupied positions by NULL.
Step 10 : Calculate the key as number of columns of all the matrices including 3 for REM by using this key calculate the Base using key-base table.
Step 11 : Adding magic square matrix of size same as that of matrix under considered to matrix. Repeat this step for all the matrices including matrix formed by REM.
Step 12 : Finally, last step merge all the elements of all square matrices, including matrix of REM in the order they were derived. To take only remainder values of REM, not all values.
Step 13 : Then perform base conversion on this merged string to get the cipher

You May Also Find These Documents Helpful