MCPcopy Index your code
hub / github.com/ccxt/ccxt / Crc32

Method Crc32

java/lib/src/main/java/io/github/ccxt/base/Crypto.java:645–651  ·  view source on GitHub ↗
(Object str, Object signed2)

Source from the content-addressed store, hash-verified

643 // ====================================================
644
645 public static Long Crc32(Object str, Object signed2) {
646 boolean signed = (signed2 instanceof Boolean) ? (Boolean) signed2 : false;
647 CRC32 crc = new CRC32();
648 crc.update(toString(str).getBytes(StandardCharsets.UTF_8));
649 long value = crc.getValue(); // unsigned 32-bit
650 return signed ? (long) (int) (value) : value;
651 }
652
653 // ====================================================
654 // Inflate (raw DEFLATE in UTF-8 bytes)

Callers 1

crc32Method · 0.95

Calls 3

toStringMethod · 0.95
updateMethod · 0.45
getValueMethod · 0.45

Tested by 1

crc32Method · 0.76