Java compatible cksum function

前端 未结 3 1616
温柔的废话
温柔的废话 2021-01-02 13:52

Is there any library/code in Java to calculate the 32-bit CRC of a stream of bytes in a way thats consistent with the cksum command in unix ?

3条回答
  •  别那么骄傲
    2021-01-02 14:17

    Jacksum: http://www.jonelo.de/java/jacksum/index.html

    cksum         algorithm:   POSIX 1003.2 CRC algorithm
                  length:      32 bits
                  type:        crc
                  since:       Jacksum 1.0.0
                  comment:     - under BeOS    it is /bin/cksum
                               - under FreeBSD it is /usr/bin/cksum
                               - under HP-UX   it is /usr/bin/cksum and
                                 /usr/bin/sum -p
                               - under IBM AIX it is /usr/bin/cksum
                               - under Linux   it is /usr/bin/cksum 
    

    It's open source.

提交回复
热议问题