Visual C# 2012 How To Program
C# Programming Challenge 5.41: PART 2: Enforcing Privacy with Cryptography – C# OOP, C# Properties, C# Methods, C# Inheritance
In this video we create 2 classes that inherit from our base class, demonstrating C# inheritance, and create methods that encrypt and decrypt user input.
A company that wants to send data over the Internet has asked you to write a program that will
encrypt it so that it may be transmitted more securely.
All the data is transmitted as four-digit integers. Your app should read a four-digit integer
entered by the user and encrypt it as follows:
Replace each digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10.
Then swap the first digit with the third, and swap the second digit with the fourth.
Then display the encrypted integer.
Write a separate app that inputs an encrypted four-digit integer and decrypts it (by reversing the encryption scheme) to form the original number. Use the format specifier D4 to display the encrypted value in case the number starts with a 0.
WATCH PART 1: Creating C# Base Class Constructor
WATCH PART 3: C# Object Instantiation
DOWNLOAD SOURCE FILES: yt-5-41-PrivacyWithCryptography