/** * Factory method to call to create a symbol table instance with a * randomized seed value. */ public static BytesToNameCanonicalizer createRoot() { /* [Issue-21]: Need to use a variable seed, to thwart hash-collision * based attacks. */ long now = System.currentTimeMillis(); // ensure it's not 0; and might as well require to be odd so: int seed = (((int) now) + ((int) now >>> 32)) | 1; return createRoot(seed); }
/** * Factory method to call to create a symbol table instance with a * randomized seed value. */ public static BytesToNameCanonicalizer createRoot() { /* [Issue-21]: Need to use a variable seed, to thwart hash-collision * based attacks. */ long now = System.currentTimeMillis(); // ensure it's not 0; and might as well require to be odd so: int seed = (((int) now) + ((int) now >>> 32)) | 1; return createRoot(seed); }