MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / __BitList_to_String

Method __BitList_to_String

thirdparty/pydes/pyDes.py:437–452  ·  view source on GitHub ↗

Turn the list of bits -> data, into a string

(self, data)

Source from the content-addressed store, hash-verified

435 return result
436
437 def __BitList_to_String(self, data):
438 """Turn the list of bits -> data, into a string"""
439 result = []
440 pos = 0
441 c = 0
442 while pos < len(data):
443 c += data[pos] << (7 - (pos % 8))
444 if (pos % 8) == 7:
445 result.append(c)
446 c = 0
447 pos += 1
448
449 if _pythonMajorVersion < 3:
450 return ''.join([ chr(c) for c in result ])
451 else:
452 return bytes(result)
453
454 def __permutate(self, table, block):
455 """Permutate this block with the specified table"""

Callers 1

cryptMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected