| Constructor and Description |
|---|
Crc32C() |
| Modifier and Type | Method and Description |
|---|---|
int |
getIntValue() |
int |
getMaskedValue() |
long |
getValue() |
static int |
mask(int crc)
Return a masked representation of crc.
|
static int |
maskedCrc32c(byte[] data) |
static int |
maskedCrc32c(byte[] data,
int offset,
int length) |
void |
reset() |
static int |
unmask(int maskedCrc)
Return the crc whose masked representation is masked_crc.
|
void |
update(byte[] b,
int off,
int len) |
void |
update(int b) |
public static int maskedCrc32c(byte[] data)
public static int maskedCrc32c(byte[] data,
int offset,
int length)
public static int mask(int crc)
Motivation: it is problematic to compute the CRC of a string that contains embedded CRCs. Therefore we recommend that CRCs stored somewhere (e.g., in files) should be masked before being stored.
crc - CRCpublic static int unmask(int maskedCrc)
maskedCrc - masked CRCpublic int getMaskedValue()
public int getIntValue()
Copyright © 2019. All rights reserved.