2018년 2월 4일 일요일

Creating CRC32 Hex string

public String getCRC32HexaString(String paramString) throws Exception  {
  byte bytes[] = paramString.getBytes(DEFAULT_CHARSET);
  Checksum checksum = new java.util.zip.CRC32();
  checksum.update(bytes, 0, bytes.length);
  long checksumValue = checksum.getValue();
  return Long.toHexString(checksumValue);
}

댓글 없음:

댓글 쓰기

Creating CRC32 Hex string

public String getCRC32HexaString(String paramString) throws Exception  {   byte bytes[] = paramString.getBytes(DEFAULT_CHARSET);   Che...