protected static int[] newKeySizeArray(int minSize, int maxSize, int step)
    {
        int[] result = new int[((maxSize - minSize) / step) + 1];
        for (int i = minSize, j = 0; i <= maxSize; i += step, j++) {
            result[j] = i;
        }
        return result;
    }
protected static int [ ] newKeySizeArray ( int minSize , int maxSize , int step ) { int [ ] result = new int [ ( ( maxSize - minSize ) / step ) + 1 ] ; for ( int i = minSize , j = 0 ; i <= maxSize ; i += step , j ++ ) { result [ j ] = i ; } return result ; }
Helper function to create supported key size arrays.

@param minSize minimum size supported.
@param maxSize maximum size supported.
@param step intermediate step supported.
@return an array of sizes.