public static long generate(long crc,String value){
  if (value == null) {
    return crc;
  }
  int len=value.length();
  for (int i=0; i < len; i++) {
    char ch=value.charAt(i);
    if (ch > 0xff) {
      crc=next(crc,(ch >> 8));
    }
    crc=next(crc,ch);
  }
  return crc;
}

public static long generate ( long crc , String value ) { if ( value == null ) { return crc ; } int len = value . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char ch = value . charAt ( i ) ; if ( ch > 0xff ) { crc = next ( crc , ( ch > > 8 ) ) ; } crc = next ( crc , ch ) ; } return crc ; }
calculates crc from a string .
