Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pythonnnnnnn nplement a simple encryption algorithm that works as follows - The algorithms uses a numerical private key named key Each character in the original

image text in transcribedpythonnnnnnn

nplement a simple encryption algorithm that works as follows - The algorithms uses a numerical private key named key Each character in the original text is encrypted as the character resulting from xoring the ASCII code of that character with private_key. For example to encrypt " A \[ \text { enc_char }=\operatorname{chr}\left(\text { ord }\left(" A^{\prime \prime} ight)^{\wedge} ight. \text { key) } \] A. Write a function named ecrypt_file that takes as argument the file name to be encrypted, the name of the output file (where to store the encrypted text) and the encryption key. The function opens the first file, and encrypted the text according to the logtim above and stores the encrypted text in the second file B. Write a multithreaded program that attempts to encrypt the contents of 10 different files concurrently using the function ecrypt_file defined in the previous step. you need to create one thread of execution to process each file. Your program asks the user to input the names of the text files to be encrypted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

Students also viewed these Databases questions

Question

understand how design and writing connect in mass communication.

Answered: 1 week ago

Question

Explain consumer behaviour.

Answered: 1 week ago

Question

Explain the factors influencing consumer behaviour.

Answered: 1 week ago

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago