Giter VIP home page Giter VIP logo

crcsolver's Introduction

Example

Supply the known data, unknown bits, target checksum, and crc function:

>>> crcsolver.solve(b'MONK__', range(32,48), 0x401a68b6, binascii.crc32)
b'MONKEY'

Example

>>> crcsolver.solve(b'M_NK_Y', [8,9,10,11,12,13,14,15,16,32,33,34,35,36,37,38,39], 0x401a68b6, binascii.crc32)
b'MONKEY'

Example

You may supply an arbitrary CRC function or the name of a CRC algorithm:

>>> crcsolver.solve(b'__NKEY', range(16), 0x401a68b6, 'CRC-32/ISO-HDLC')
b'MONKEY'

The full list of available named CRC's is found in crc_catalog.py.

Example

This package also can compute checksums:

>>> hex(crcsolver.compute(b'MONKEY', 'CRC-3/GSM'))
'0x5'
>>> hex(crcsolver.compute(b'MONKEY', 'CRC-32/ISO-HDLC'))
'0x401a68b6'
>>> hex(crcsolver.compute(b'MONKEY', 'CRC-32/MPEG-2'))
'0xe643d817'
>>> hex(crcsolver.compute(b'MONKEY', 'CRC-64/ECMA-182'))
'0x2cf08634f65960ae'
>>> hex(crcsolver.compute(b'MONKEY', 'CRC-82/DARC'))
'0x240a7856c67f10a2c0f7f'

The full list of available named CRC's is found in crc_catalog.py.

Example

You may supply a dictionary of generalized CRC parameters to compute a CRC:

>>> hex(crcsolver.compute(b'MONKEY', {'width':32, 'poly':0x04c11db7, 'init':0xffffffff, 'refin':True, 'refout':True, 'xorout':0xffffffff}))
'0x401a68b6'

Prior Art

crcsolver's People

Contributors

lwerdna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.