Question
MATLAB Please help with encryption. Then main program should then call a function encrypt message which should take in the message to encrypt and the
MATLAB
Please help with encryption.
Then main program should then call a function encrypt message which should
take in the message to encrypt and the keyword
subtract 'a' from each element of the message (so the letter a is now 0)
subtract 'a' from each element of the keyword
encrypt the message using the keyword as described above (hint: first handle the letters encrypted using k0, then those encrypted using k1, etc)
add 'a' to each element of the encrypted message (so it uses proper ASCII) return the encrypted message
Enter a message in lower case with no spaces to encrypt: programmingisfun
Enter a length-5 keyword in lower case: maths
The encrypted message is: brhnjmmfpfsilmmz
The decrypted message is: programmingisfun
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started