We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad15751 commit bb98f65Copy full SHA for bb98f65
src/main/java/org/apache/commons/codec/digest/CRC16.java
@@ -26,6 +26,15 @@
26
* <p>
27
* Since there are so many CRC-16 variants, we do not pick a default.
28
* </p>
29
+ * <p>
30
+ * To create a create a custom variant of CRC16-MODBUS with a init value of {@code 0x0000}, call:
31
+ * </p>
32
+ * <pre>
33
+ * Checksum crc16 = CRC16.builder()
34
+ * .setTable(CRC16.getModbusTable())
35
+ * .setInit(0x0000)
36
+ * .get();
37
+ * </pre>
38
*
39
* @see <a href="https://en.wikipedia.org/wiki/Cyclic_redundancy_check">Cyclic redundancy check</a>
40
* @see <a href="https://reveng.sourceforge.io/crc-catalogue/16.htm">Catalogue of parametrised CRC algorithms with 16 bits</a>
0 commit comments