o more crc checking
This commit is contained in:
@@ -18,8 +18,10 @@ for i in range(bits-1,-1,-1):
|
||||
else:
|
||||
sys.stdout.write("0")
|
||||
if i and not i%8:
|
||||
sys.stdout.write(" ")
|
||||
|
||||
sys.stdout.write(" ")
|
||||
|
||||
|
||||
|
||||
print
|
||||
print "0x%x"% v
|
||||
print v
|
||||
|
||||
@@ -34,6 +34,7 @@ def test_performance():
|
||||
|
||||
def test_algo():
|
||||
data='david'
|
||||
data='d'
|
||||
print "%x" % do_crc(data)
|
||||
|
||||
|
||||
@@ -59,6 +60,7 @@ def main():
|
||||
#print result
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_algo()
|
||||
main()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user