import fnv1aHash from '@sindresorhus/fnv1a';
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
export const fnv1a = {
    hash: (input) => {
        return Number(fnv1aHash(input, {
            size: 32
        }));
    },
    hashV: (input, seed) => {
        return numberToBuffer(fnv1a.hash(input, seed));
    }
};
export function numberToBuffer(num) {
    let hex = num.toString(16);
    if (hex.length % 2 === 1) {
        hex = `0${hex}`;
    }
    return uint8ArrayFromString(hex, 'base16');
}
//# sourceMappingURL=hashes.js.map