main.cpp
//fn that performs encryption acccording to the rules of atbash cipher(to know working of cipher, refer to readme)

fn that performs encryption acccording to the rules of atbash cipher(to know working of cipher, refer to readme)
fn that performs encryption acccording to the rules of atbash cipher ( to know working of cipher refer to readme )
void atbash::processatbash()
{
    cout << "Enter your message:\n";
    fflush(stdin);
    gets(plaintext_atbash);
    int i;
    cout << "\nThe encrypted message is: ";
    for (i = 0; i < strlen(plaintext_atbash); i++)
    {
        if ('a' <= plaintext_atbash[i] && plaintext_atbash[i] <= 'z')
            ciphertext_atbash[i] = 'a' + 'z' - plaintext_atbash[i];
        else if ('A' <= plaintext_atbash[i] && plaintext_atbash[i] <= 'Z')
            ciphertext_atbash[i] = 'a' + 'z' - plaintext_atbash[i] - 32;
        else
            ciphertext_atbash[i] = plaintext_atbash[i];
        cout << ciphertext_atbash[i];
    }
    cout << "\n\nEnter any key to know about the working of the ATBASH CIPHER: ";
    char ch;
    cin >> ch;
    display_atbash();
}
void atbash :: processatbash ( ) { cout << " \n " ; fflush ( stdin ) ; gets ( plaintext_atbash ) ; int i ; cout << " \n " ; for ( i = 0 ; i < strlen ( plaintext_atbash ) ; i ++ ) { if ( ' ' <= plaintext_atbash [ i ] && plaintext_atbash [ i ] <= ' ' ) ciphertext_atbash [ i ] = ' ' + ' ' - plaintext_atbash [ i ] ; else if ( ' ' <= plaintext_atbash [ i ] && plaintext_atbash [ i ] <= ' ' ) ciphertext_atbash [ i ] = ' ' + ' ' - plaintext_atbash [ i ] - 32 ; else ciphertext_atbash [ i ] = plaintext_atbash [ i ] ; cout << ciphertext_atbash [ i ] ; } cout << " \n \n " ; char ch ; cin >> ch ; display_atbash ( ) ; }
fn that performs encryption acccording to the rules of atbash cipher(to know working of cipher, refer to readme)
fn that performs encryption acccording to the rules of atbash cipher ( to know working of cipher refer to readme )