question archive Assembly Language: Hi, can you please help me in creating a procedure named "Encrypt" that performs simple encryption on a null-terminated ASCII byte array by rotating each plaintext byte a varying number of positions in different directions using a key value stored in a key array with type BYTE

Assembly Language: Hi, can you please help me in creating a procedure named "Encrypt" that performs simple encryption on a null-terminated ASCII byte array by rotating each plaintext byte a varying number of positions in different directions using a key value stored in a key array with type BYTE

Subject:Computer SciencePrice: Bought3

Assembly Language: Hi, can you please help me in creating a procedure named "Encrypt" that performs simple encryption on a null-terminated ASCII byte array by rotating each plaintext byte a varying number of positions in different directions using a key value stored in a key array with type BYTE.

For example, in the following array that represents the encryption key, a negative value indicates a rotation to the left and a positive value indicates a rotation to the right. The integer in each position indicates the magnitude of the rotation:

key BYTE -2, 4, 1, 0, -3, 5, 2, -4, -4, 6

 

Your procedure should loop through a plaintext message and align the key to the ?rst 10 bytes of the message. Rotate each plaintext byte by the amount indicated by its matching key array value. Then, align the key to the next 10 bytes of the message and repeat the process. Your plaintext string needs to be greater than 10 bytes in length. Your Encrypt procedure should encrypt the entire message with one call to it.

 

And also a test program that calls the Encrypt procedure once and passes the address offset of the plaintext string and key. Your test program should output the original plaintext string to the console before encryption and the string after it is encrypted.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions