1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2000,2008 Oracle. All rights reserved. 5 * 6 * $Id: Hasher.java,v 12.7 2008/01/17 05:04:53 mjc Exp $ 7 */ 8package com.sleepycat.db; 9 10/** 11An application-specified, database hash function. 12*/ 13public interface Hasher { 14 /** 15 An application-specified, database-specific hash function. 16 <p> 17 The hash function must handle any key values used by the application 18 (possibly including zero-length keys). 19 <p> 20 @param db 21 The enclosing database handle. 22 @param data 23 The byte string to be hashed. 24 @param len 25 The length of the byte string in bytes. 26 <p> @return 27 The hash value of the byte string. 28 */ 29 int hash(Database db, byte[] data, int len); 30} 31