OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.58k stars 3.7k forks source link

Adding playfair-cipher written in C language and also updating Quick_hull.cpp with commented output #6153

Open Raven1233 opened 3 years ago

Raven1233 commented 3 years ago

This is a(n):

Details:

The Playfair Cipher Encryption Algorithm: The Algorithm consists of 2 steps:

1)Generate the key Square(5×5): The key square is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the table (as the table can hold only 25 alphabets). If the plaintext contains J, then it is replaced by I.

 The initial alphabets in the key square are the unique alphabets of the key in the order in which they appear followed by the 
 remaining letters of the alphabet in order. 

2) Algorithm to encrypt the plain text: The plaintext is split into pairs of two letters (digraphs). If there is an odd number of letters, a Z is added to the last letter.

Raven1233 commented 3 years ago

@AdiChat Sir, I have added the PR. Please review it

Raven1233 commented 3 years ago

@AdiChat Sir, I had sent the PR #6152 and it has been in waiting for some time now, can you please check and review it?