![]() This hook is provided to allow users to provide their own It is also used forĪccumulating a checksum from fragments of a large message (or file) The CRC of the previous member can be used as the seed forĬalculating the CRC of the next member. Structures without first converting the whole structure into a ![]() This can be useful for calculating the CRC for data Is 0 for the CRC16 calculation and 0xFFFF for the CCITT version. Select an alternative seed value for the CRC calculation. Return the checksum using an alternative format template. Return a checksum for the file contents instead of for parameter data. Is not the fastest method to implement this algorithm in Tcl and a As an example this has been done already - however this Package as the implementation is sufficiently generic to extend to 32īit checksums. It is possible to implement the CRC-32 checksum using this crc16 ForĬonvenience each of these has a command alias in the crc namespace. The most commonly used of these are included in this package. Using the format(n) specifier provided or as an unsigned integerĪ number of common polynomials are in use with the CRC algorithm and The command used sets up theĬRC polynomial, initial value and bit ordering for the desired Value calculated using the CRC algorithm. The command takes either string data or a file name and returns a checksum Defaults are set upĬOMMANDS ::crc::crc16 ?-format format?-seed value?-implementation procname? message ::crc::crc16 ?-format format?-seed value?-implementation procname? -filename file ::crc::crc-ccitt ?-format format?-seed value?-implementation procname? message ::crc::crc-ccitt ?-format format?-seed value?-implementation procname? -filename file ::crc::xmodem ?-format format?-seed value?-implementation procname? message ::crc::xmodem ?-format format?-seed value?-implementation procname? -filename file There are a number of permutations available for calculating CRCĬhecksums and this package can handle all of them. This package provides a Tcl-only implementation of the CRCĪlgorithms based upon information provided at ::crc::xmodem ?-format format?-seed value?-implementation procname? -filename file ::crc::xmodem ?-format format?-seed value?-implementation procname? message ::crc::crc-ccitt ?-format format?-seed value?-implementation procname? -filename file ::crc::crc-ccitt ?-format format?-seed value?-implementation procname? message ::crc::crc16 ?-format format?-seed value?-implementation procname? -filename file ::crc::crc16 ?-format format?-seed value?-implementation procname? message Command to display crc16 manual in Linux: $ man n crc16 NAMEĬrc16 - Perform a 16bit Cyclic Redundancy Check
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |