main.cpp
//fn to transform the key into the required format

fn to transform the key into the required format
fn to transform the key into the required format
void playfair ::generate_key()
{
    int i, k = 0;
    for (i = 0; i < strlen(inp_key); i++)
    {
        int j, repeat = 0;
        for (j = 0; j < strlen(key); j++)
            if (inp_key[i] == key[j])
                repeat++;
        if (repeat || inp_key[i] == 'j' || inp_key[i] < 'a' || inp_key[i] > 'z')
            continue;
        key[k++] = inp_key[i];
    }
    key[k] = '\0';
}
void playfair :: generate_key ( ) { int i , k = 0 ; for ( i = 0 ; i < strlen ( inp_key ) ; i ++ ) { int j , repeat = 0 ; for ( j = 0 ; j < strlen ( key ) ; j ++ ) if ( inp_key [ i ] == key [ j ] ) repeat ++ ; if ( repeat || inp_key [ i ] == ' ' || inp_key [ i ] < ' ' || inp_key [ i ] > ' ' ) continue ; key [ k ++ ] = inp_key [ i ] ; } key [ k ] = ' \0 ' ; }
fn to transform the key into the required format
fn to transform the key into the required format
// Check if character going to repeat
 // If not repeated enter into key
