All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.legaldocml.util.Hashing Maven / Gradle / Ivy

package io.legaldocml.util;

import io.legaldocml.unsafe.UnsafeHelper;
import io.legaldocml.unsafe.UnsafeString;

/**
 * @author Jacques Militello
 */
public final class Hashing {

    private static final XXHash XX_HASH_INSTANCE = new XXHash();

    private Hashing() {
    }

    public static long xx(long seed, String value) {
        char[] op = UnsafeString.getChars(value);
        return XX_HASH_INSTANCE.xxHash64(seed, UnsafeHelper.CHAR_ARRAY_BASE_OFFSET, op.length * 2l, op);
    }

    public static long xx(long seed, HashReader reader) {
        return XX_HASH_INSTANCE.xxHash64(seed, reader);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy