List of utility methods to do CRC32 Byte Array
long | computeCRC(byte[] value) Returns the CRC value for the given byte[] CRC32 checksumEngine = new CRC32(); checksumEngine.update(value, 0, value.length); long checksumMessage = checksumEngine.getValue(); checksumEngine.reset(); return checksumMessage; |
long | computeCRC32(byte[] bytes) compute CRC CRC32 crc = new CRC32(); crc.reset(); crc.update(bytes); return crc.getValue(); |
int | crc32(byte[] array) crc if (array != null) { return crc32(array, 0, array.length); return 0; |
long | crc32(byte[] bts) Calculates the crc32 and casts it to an integer, this avoids clojure's number autoboxing final CRC32 crc = new CRC32(); crc.update(bts); return crc.getValue(); |
int | CRC32(byte[] buffer) CRC CRC32 crc = new CRC32(); crc.update(buffer); return (int) crc.getValue(); |
long | crc32(byte[] bytes) Compute the CRC32 of the byte array return crc32(bytes, 0, bytes.length);
|
String | crc32(byte[] bytes) crc java.util.zip.CRC32 x = new java.util.zip.CRC32(); x.update(bytes); String crcString = Long.toHexString(x.getValue()); if (crcString.length() % 2 != 0) { crcString = "0" + crcString; String reverseCrcString = crcString.substring(6, 8) + crcString.substring(4, 6) + crcString.substring(2, 4) + crcString.substring(0, 2); ... |
long | crc32(final byte[] bytes) crc Checksum checksum = new CRC32(); checksum.update(bytes, 0, bytes.length); long checksumValue = checksum.getValue(); return checksumValue; |
int | crc32(String value) Computes and returns the CRC32 hash value for the supplied string. _crc.reset(); _crc.update(value.getBytes()); return (int) _crc.getValue(); |
long | crc32Number(String s) crc Number try { byte bytes[] = s.getBytes(); Checksum checksum = new CRC32(); checksum.update(bytes, 0, bytes.length); long lngChecksum = checksum.getValue(); return lngChecksum; } catch (Exception e) { e.printStackTrace(); ... |