Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you solve this in python3, please? P1: Shift Cipher & Passwords (15 marks Providedes cryptopy Fellowbrypto. Marking: correctes 10 marks, style 5 marks CautionYour
Can you solve this in python3, please?
P1: Shift Cipher & Passwords (15 marks Providedes cryptopy Fellowbrypto. Marking: correctes 10 marks, style 5 marks CautionYour encrypt function may not use any function from my imported modules, the findil or index tuncions, or lists The scipher, which is sometimes called the Cepher, in a simple encryption scheme The basics to replace every derinamassage with the later that appears fed distance from it in the phone. When you go past the end of the sphate you the wrap around to the other end Foreccang, if the secret at a-3 then would be replaced with "A" since Ain found 3 places to the top in the sphabet Since moving places to the bottom would go past the start of the phabet, it wrap around to the back to Z. would haft to y und "A would hit tox. This is red in the following diagram ARGDGE MADL First, write a new function in the crypto.py file called encrypt takes and enerypils" it in the shift opher with a specified it and alphabet. There and return type are given by eneryptimeapete, hinint, alphabet: stel ->te Apostweshin replaces a later with the letter shit-places to the right in the given alphabet negative shift replaces a later with the later that is-shit-plan to the left. This is applied to each later in the message to create the outputted ciphere. Here is some examples of the union >>LEP, 2. ted" > Eypbed, -bed> >Leypt baya, , bodoh jurata") W21-COMP 1005 Due Friday, Feb 12 11:50PM >ESPEI'aba, 0, badagaskasspray type scape, cigalpatuwaya"> colats Your lunction should only use base Python code to work with string. You may NOT function from any imported modes, thered or index) lanciors, or its Your function should not look anything at all like the provided decrypt function. But you can use the provided decrypt function is test your encrypt function. For any messages and habet, the following matuto True decrypt encryptimaye it. phabeti, hlet, alphabet) -- message That is when you encrypta message with a given shit then it must decrypt back to the same Notes you may have heard about the ro1-13 encryption scheme. This is just the shit cipher using as of 13 with the 26-later in alphabet Next, add another fundin to the cryptopy feed passwordsValid tubes a string input and outputs whether or not the string is a valid pood True False). The rules for a valid pod are given by Alpassword must be at least characters lang Alpaswordu must have at least two dig int01.23 Alpasswords must have at least one special character in "not including Ni passwords must have at least one uppercase leter Alpassword must have at least one lowercler A password must start with the later or an underscore The signature and retum type is given by Mardalsdedit -> bool Example > pali Add your modified crypto.py file to your smartapeStep 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