@Override
    public char[] getDecryptedData(char[] encryptedData) {
        int noOfCols = encryptedData.length / depth;
        if (encryptedData.length % depth != 0) {
            noOfCols++;
        }

        char[][] convertedJaggedArray = new char[depth][noOfCols];
        int k = 0;
        for (int j = 0; j < depth; j++) {
            for (int i = 0; i < noOfCols; i++) {
                if (k >= encryptedData.length) {
                    break;
                }
                convertedJaggedArray[j][i] = encryptedData[k++];
            }
        }

        char[] plainText = new char[encryptedData.length];
        k = 0;
        for (int i = 0; i < noOfCols; i++) {
            for (int j = 0; j < depth; j++) {
                if (k >= encryptedData.length) {
                    break;
                }
                plainText[k++] = convertedJaggedArray[j][i];
            }
        }

        return new String(plainText).toCharArray();
    }