src/ie/gmit/sw/ai/Playfair.java
public void generateKey() {
        boolean flag = true;
        char current;
        key = keyWord;
        for (int i = 0; i < 26; i++) {
            current = (char) (i + 97);
            if (current == 'j')
                continue;
            for (int j = 0; j < keyWord.length(); j++) {
                if (current == keyWord.charAt(j)) {
                    flag = false;
                    break;
                }//if
            }//for
            if (flag)
                key = key + current;
            flag = true;
        }//for
        //System.out.println(key + "\n");
    }
//generate the key - add alphabet to end of key excluding j
generate the key - add alphabet to end of key excluding j
generate the key - add alphabet to end of key excluding j
public void generateKey() {
        boolean flag = true;
        char current;
        key = keyWord;
        for (int i = 0; i < 26; i++) {
            current = (char) (i + 97);
            if (current == 'j')
                continue;
            for (int j = 0; j < keyWord.length(); j++) {
                if (current == keyWord.charAt(j)) {
                    flag = false;
                    break;
                }
            }
            if (flag)
                key = key + current;
            flag = true;
        }
    }
public void generateKey ( ) { boolean flag = true ; char current ; key = keyWord ; for ( int i = 0 ; i < 26 ; i ++ ) { current = ( char ) ( i + 97 ) ; if ( current == 'j' ) continue ; for ( int j = 0 ; j < keyWord . length ( ) ; j ++ ) { if ( current == keyWord . charAt ( j ) ) { flag = false ; break ; } } if ( flag ) key = key + current ; flag = true ; } }
generate the key - add alphabet to end of key excluding j
generate the key - add alphabet to end of key excluding j
//if //for //for //System.out.println(key + "\n");