Here you can find the source of FNVHash1(byte[] data)
public static int FNVHash1(byte[] data)
//package com.java2s; //License from project: Apache License public class Main { public static int FNVHash1(byte[] data) { final int p = 16777619; int hash = (int) 2166136261L; for (byte b : data) hash = (hash ^ b) * p;/*from www. j av a 2 s . c o m*/ hash += hash << 13; hash ^= hash >> 7; hash += hash << 3; hash ^= hash >> 17; hash += hash << 5; return hash; } public static int FNVHash1(String data) { final int p = 16777619; int hash = (int) 2166136261L; for (int i = 0; i < data.length(); i++) hash = (hash ^ data.charAt(i)) * p; hash += hash << 13; hash ^= hash >> 7; hash += hash << 3; hash ^= hash >> 17; hash += hash << 5; return hash; } }