예제 #1
0
 def long_to_bytes(n, blocksize=0):
     ret = _long_to_bytes(n)
     if blocksize == 0:
         return ret
     else:
         assert len(ret) <= blocksize
         padding = blocksize - len(ret)
         return b'\x00' * padding + ret
예제 #2
0
파일: utils.py 프로젝트: joshis1/Python
 def long_to_bytes(n, blocksize=0):
     ret = _long_to_bytes(n)
     if blocksize == 0:
         return ret
     else:
         assert len(ret) <= blocksize
         padding = blocksize - len(ret)
         return b"\x00" * padding + ret
예제 #3
0
파일: utils.py 프로젝트: joshis1/Python
 def long_to_bytes(n, blocksize=0):
     return _long_to_bytes(n, blocksize or None)
예제 #4
0
 def long_to_bytes(n, blocksize=0):
     return _long_to_bytes(n, blocksize or None)