This document describes implementations of the Ceaser and Vigenere ciphers. It includes:
1. An overview of the Ceaser cipher which replaces each letter with one a certain number of positions up or down.
2. The pseudocode for the Ceaser cipher algorithm which shifts each letter and handles overflow.
3. Screenshots of the Ceaser cipher implementation.
4. An overview of the Vigenere cipher which uses a keyword to shift letters by varying amounts.
5. The pseudocode for the Vigenere cipher algorithm which shifts letters based on the corresponding keyword letter.
6. Screenshots of the Vigenere cipher implementation.
Replacing `import` with `accio` in cpythonAmy Hanlon
Replacing `import` with `accio`: Compiling Pythons with Custom Grammar for the sake of a joke!
These are the slides from my 03/25/14 talk at NYC Hack and Tell.
Help create the vcipher-h and vcipher-cc files for the vigenere cipher.pdfa2zmobiles
Help create the vcipher.h and vcipher.cc files for the vigenere cipher which MUST inherit
from substitution and running key cipher(kcipher.h and kcipher.cc). Please follow the
instructions and complete the provided code:
Substitution cipher (implemented in cipher.h and cipher.cc) class has already been defined (but
not implemented) for you. The other cipher classes MUST
a) inherit from the substitution cipher, or
b) inherit from one of the four other cipher classes (e.g., Caesar inherits from Substitution,
ROT13 inherits from Caesar).
4. Each new cipher class MUST have a constructor, a default constructor (except the ROT13
cipher, as described below), and a destructor .
a) Each constructor should accept the input appropriate for the cipher:
i) substitution - cipher alphabet - must contain every letter in the alphabet, and only once, and
they must all be lower case. It should contain no other characters (e.g., no space, punctuation,
etc.). Cipher alphabet length should always be 26.
iv) Running Key - a vector of strings. The vector represents the cipher "book," and each element
in the vector is a "page" from the book. Each page should be a non-empty string. This string
should consist of only lower case letter or spaces.
v) Vigenere - a string representing the key word. The key word should consist of only lower case
letters.
b) Each default constructor should not accept any inputs.
ii) Other ciphers: default constructor should initialize the object so that encrypting any plain text
should return a cipher text that is identical to the plain text. For example, for Caesar, setting the
shift to 0 will achieve this. YOU CANNOT SIMPLY RETURN THE PLAIN TEXT - IT MUST
STILL ENCRYPT THE TEXT using the proper method.
b) the destructor should free all memory. Valgrind will be used to make sure there are no
memory leaks.
5. Each cipher must also provide encrypt and decrypt functions. They can either be implemented
explicitly, or implicitly using inheritance. This is a design decision, but the decision should be
made to minimize/modularize your code.
i) Encrypt: Assume that the input plain text will always be a) lower case letter, b) upper case
letter, or c) a space. Space should not be encrypted (i.e., if the plain text is "hello world", the
encrypted text should look something like "abcde fghij". Upper case letter should be encrypted to
an upper case letter (you don't have to, but you will find that meeting the decrypt requirement
below will be difficult otherwise).
ii) Decrypt: This should take in the encrypted text and return the origin plain text. It should
a) retain the case (i.e., if the input plain text has an upper case letter, the decrypted plain text
should have that letter as upper case.
b) retain the space - If the plain text had spaces, the decrypted text should still have those spaces
in the correct place.
6. Data members in all cipher classes should be hidden using the Cheshire smile.
7. Each cipher should also check to make sure that the pr.
Help create the kcipher-h and kcipher-cc files for the running key cip.pdfgaurav444u
Help create the kcipher.h and kcipher.cc files for the running key cipher which MUST
inherit from substitution. Please follow the instructions and complete the provided code:
Substitution cipher (implemented in cipher.h and cipher.cc) class has already been defined (but
not implemented) for you. The other cipher classes MUST
a) inherit from the substitution cipher, or
b) inherit from one of the four other cipher classes (e.g., Caesar inherits from Substitution,
ROT13 inherits from Caesar).
4. Each new cipher class MUST have a constructor, a default constructor (except the ROT13
cipher, as described below), and a destructor .
a) Each constructor should accept the input appropriate for the cipher:
i) substitution - cipher alphabet - must contain every letter in the alphabet, and only once, and
they must all be lower case. It should contain no other characters (e.g., no space, punctuation,
etc.). Cipher alphabet length should always be 26.
ii) Caesar - positive shift/rotation/offset integer. This value can be larger than 26, in which case it
has rotated completely one or more times.
iii) ROT13 - no input required for constructor (see default constructor below).
iv) Running Key - a vector of strings. The vector represents the cipher "book," and each element
in the vector is a "page" from the book. Each page should be a non-empty string. This string
should consist of only lower case letter or spaces.
v) Vigenere - a string representing the key word. The key word should consist of only lower case
letters.
b) Each default constructor should not accept any inputs.
i) ROT13: ROT13 should only have a default constructor, and it should function properly as a
ROT13 cipher with the default constructor.
ii) Other ciphers: default constructor should initialize the object so that encrypting any plain text
should return a cipher text that is identical to the plain text. For example, for Caesar, setting the
shift to 0 will achieve this. YOU CANNOT SIMPLY RETURN THE PLAIN TEXT - IT MUST
STILL ENCRYPT THE TEXT using the proper method.
b) the destructor should free all memory. Valgrind will be used to make sure there are no
memory leaks.
5. Each cipher must also provide encrypt and decrypt functions. They can either be implemented
explicitly, or implicitly using inheritance. This is a design decision, but the decision should be
made to minimize/modularize your code.
i) Encrypt: Assume that the input plain text will always be a) lower case letter, b) upper case
letter, or c) a space. Space should not be encrypted (i.e., if the plain text is "hello world", the
encrypted text should look something like "abcde fghij". Upper case letter should be encrypted to
an upper case letter (you don't have to, but you will find that meeting the decrypt requirement
below will be difficult otherwise).
ii) Decrypt: This should take in the encrypted text and return the origin plain text. It should
a) retain the case (i.e., if the input plain text has an upper case letter, the decryp.
Replacing `import` with `accio` in cpythonAmy Hanlon
Replacing `import` with `accio`: Compiling Pythons with Custom Grammar for the sake of a joke!
These are the slides from my 03/25/14 talk at NYC Hack and Tell.
Help create the vcipher-h and vcipher-cc files for the vigenere cipher.pdfa2zmobiles
Help create the vcipher.h and vcipher.cc files for the vigenere cipher which MUST inherit
from substitution and running key cipher(kcipher.h and kcipher.cc). Please follow the
instructions and complete the provided code:
Substitution cipher (implemented in cipher.h and cipher.cc) class has already been defined (but
not implemented) for you. The other cipher classes MUST
a) inherit from the substitution cipher, or
b) inherit from one of the four other cipher classes (e.g., Caesar inherits from Substitution,
ROT13 inherits from Caesar).
4. Each new cipher class MUST have a constructor, a default constructor (except the ROT13
cipher, as described below), and a destructor .
a) Each constructor should accept the input appropriate for the cipher:
i) substitution - cipher alphabet - must contain every letter in the alphabet, and only once, and
they must all be lower case. It should contain no other characters (e.g., no space, punctuation,
etc.). Cipher alphabet length should always be 26.
iv) Running Key - a vector of strings. The vector represents the cipher "book," and each element
in the vector is a "page" from the book. Each page should be a non-empty string. This string
should consist of only lower case letter or spaces.
v) Vigenere - a string representing the key word. The key word should consist of only lower case
letters.
b) Each default constructor should not accept any inputs.
ii) Other ciphers: default constructor should initialize the object so that encrypting any plain text
should return a cipher text that is identical to the plain text. For example, for Caesar, setting the
shift to 0 will achieve this. YOU CANNOT SIMPLY RETURN THE PLAIN TEXT - IT MUST
STILL ENCRYPT THE TEXT using the proper method.
b) the destructor should free all memory. Valgrind will be used to make sure there are no
memory leaks.
5. Each cipher must also provide encrypt and decrypt functions. They can either be implemented
explicitly, or implicitly using inheritance. This is a design decision, but the decision should be
made to minimize/modularize your code.
i) Encrypt: Assume that the input plain text will always be a) lower case letter, b) upper case
letter, or c) a space. Space should not be encrypted (i.e., if the plain text is "hello world", the
encrypted text should look something like "abcde fghij". Upper case letter should be encrypted to
an upper case letter (you don't have to, but you will find that meeting the decrypt requirement
below will be difficult otherwise).
ii) Decrypt: This should take in the encrypted text and return the origin plain text. It should
a) retain the case (i.e., if the input plain text has an upper case letter, the decrypted plain text
should have that letter as upper case.
b) retain the space - If the plain text had spaces, the decrypted text should still have those spaces
in the correct place.
6. Data members in all cipher classes should be hidden using the Cheshire smile.
7. Each cipher should also check to make sure that the pr.
Help create the kcipher-h and kcipher-cc files for the running key cip.pdfgaurav444u
Help create the kcipher.h and kcipher.cc files for the running key cipher which MUST
inherit from substitution. Please follow the instructions and complete the provided code:
Substitution cipher (implemented in cipher.h and cipher.cc) class has already been defined (but
not implemented) for you. The other cipher classes MUST
a) inherit from the substitution cipher, or
b) inherit from one of the four other cipher classes (e.g., Caesar inherits from Substitution,
ROT13 inherits from Caesar).
4. Each new cipher class MUST have a constructor, a default constructor (except the ROT13
cipher, as described below), and a destructor .
a) Each constructor should accept the input appropriate for the cipher:
i) substitution - cipher alphabet - must contain every letter in the alphabet, and only once, and
they must all be lower case. It should contain no other characters (e.g., no space, punctuation,
etc.). Cipher alphabet length should always be 26.
ii) Caesar - positive shift/rotation/offset integer. This value can be larger than 26, in which case it
has rotated completely one or more times.
iii) ROT13 - no input required for constructor (see default constructor below).
iv) Running Key - a vector of strings. The vector represents the cipher "book," and each element
in the vector is a "page" from the book. Each page should be a non-empty string. This string
should consist of only lower case letter or spaces.
v) Vigenere - a string representing the key word. The key word should consist of only lower case
letters.
b) Each default constructor should not accept any inputs.
i) ROT13: ROT13 should only have a default constructor, and it should function properly as a
ROT13 cipher with the default constructor.
ii) Other ciphers: default constructor should initialize the object so that encrypting any plain text
should return a cipher text that is identical to the plain text. For example, for Caesar, setting the
shift to 0 will achieve this. YOU CANNOT SIMPLY RETURN THE PLAIN TEXT - IT MUST
STILL ENCRYPT THE TEXT using the proper method.
b) the destructor should free all memory. Valgrind will be used to make sure there are no
memory leaks.
5. Each cipher must also provide encrypt and decrypt functions. They can either be implemented
explicitly, or implicitly using inheritance. This is a design decision, but the decision should be
made to minimize/modularize your code.
i) Encrypt: Assume that the input plain text will always be a) lower case letter, b) upper case
letter, or c) a space. Space should not be encrypted (i.e., if the plain text is "hello world", the
encrypted text should look something like "abcde fghij". Upper case letter should be encrypted to
an upper case letter (you don't have to, but you will find that meeting the decrypt requirement
below will be difficult otherwise).
ii) Decrypt: This should take in the encrypted text and return the origin plain text. It should
a) retain the case (i.e., if the input plain text has an upper case letter, the decryp.
SQL injection is a type of security exploit in which the attacker adds SQL statements through a web application's input fields or hidden parameters to gain access to resources or make changes to data.
SOAP IS:
Lightweight communication protocol
For communication between applicationsone-way, request/response, multicast, etc..
Designed to communicate via HTTP
Not tied to any component technology
Not tied to any programming language
Based on XML
Simple and extensible
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
SQL injection is a type of security exploit in which the attacker adds SQL statements through a web application's input fields or hidden parameters to gain access to resources or make changes to data.
SOAP IS:
Lightweight communication protocol
For communication between applicationsone-way, request/response, multicast, etc..
Designed to communicate via HTTP
Not tied to any component technology
Not tied to any programming language
Based on XML
Simple and extensible
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
4. Ceaser Cipher
1.1 Ceaser Cipher
The Caesar cipher, also known as a shift cipher, is one of the simplest forms of
encryption. It is a substitution cipher where each letter in the original message
(called the plaintext) is replaced with a letter corresponding to a certain number
of letters up.
1.2 Algorithm
public static class Ceaser
{
public static string Encrypt(string plainText, int shift)
{
return CeaserAlgorithm(plainText, shift);
}
public static string Decrypt(string cipheredText, int shift)
{
return CeaserAlgorithm(cipheredText, shift * -1);
}
private static bool IsLetter(char letter)
{
return char.IsLetter(letter);
}
private static string CeaserAlgorithm(string text, int shift)
{
var buffer = text.ToCharArray();
for (var i = 0; i < buffer.Length; i++)
{
var letter = buffer[i];
if (!IsLetter(letter))
{
buffer[i] = ' ';
}
else
{
letter = (char)(letter + shift);
if (IsOverFlow(letter))
letter = (char)(letter - 26);
else if (IsUnderFlow(letter))
letter = (char)(letter + 26);
buffer[i] = letter;
}
}
return new string(buffer);
}
private static bool IsOverFlow(char letter)
{
return letter > 'z';
}
private static bool IsUnderFlow(char letter)
{
return letter < 'a';
}
}
6. Vigenere Cipher
2.1 Vigenere Cipher
The Vigenere cipher is a method of encrypting alphabetic text by using a series
of different Caesar ciphers based on the letters of a keyword. It is a simple form
of polyalphabetic substitution.
2.2 Algorithm
public static class Vigenere
{
private static string Algorithm(string input, string key, bool encipher)
{
if (key.Any(t => !IsLetter(t)))
return null;
var result = string.Empty;
var nonAlphaCharCount = 0;
for (var i = 0; i < input.Length; ++i)
{
if (IsLetter(input[i]))
{
var offset = 'a';
if (IsUpperLetter(input[i]))
offset = 'A';
var keyIndex = (i - nonAlphaCharCount) % key.Length;
var k = (IsUpperLetter(input[i]) ? char.ToUpper(key[keyIndex]) :
char.ToLower(key[keyIndex])) - offset;
k = encipher ? k : -k;
var ch = (char)(Mod(input[i] + k - offset, 26) + offset);
result += ch;
}
else
{
result += input[i];
++nonAlphaCharCount;
}
}
return result;
}
private static bool IsUpperLetter(char c)
{
return char.IsUpper(c);
}
private static bool IsLetter(char letter)
{
return char.IsLetter(letter);
}
public static string Encrypt(string input, string key)
{
return Algorithm(input, key, true);
}
public static string Decrypt(string input, string key)
{
return Algorithm(input, key, false);
}
private static int Mod(int a, int b)
{
return (a % b + b) % b;
}
}