parameters: (bn, size)
return_statement: return data.raw[:size]
docstring: Converts a bn instance to a byte string of length "size".
  
      We make the assumption that all bin representations of BIGNUMs will be the
      same length. In semi-rare cases the bignum use than data_len bytes.  Such
      cases mean that less than data_len bytes will be written into bin, thus bin
      will contain uninitialized values. We fix this by packeting zeros in the
      front of bignum. Zeros won't impact the magnitude of bin, but will ensure
      that all bytes are initalized.
  
      Args:
          bn: A bn(BIGNUM) instance
          size: An int that represnts the requested size of the output string.
  
      Returns:
          A byte string containing the data from bn of length "size"
docstring_summary: Converts a bn instance to a byte string of length "size".
docstring_tokens: Converts a bn instance to a byte string of length size .
function: def BNToBin(bn, size):
      """
      Converts a bn instance to a byte string of length "size".
  
      We make the assumption that all bin representations of BIGNUMs will be the
      same length. In semi-rare cases the bignum use than data_len bytes.  Such
      cases mean that less than data_len bytes will be written into bin, thus bin
      will contain uninitialized values. We fix this by packeting zeros in the
      front of bignum. Zeros won't impact the magnitude of bin, but will ensure
      that all bytes are initalized.
  
      Args:
          bn: A bn(BIGNUM) instance
          size: An int that represnts the requested size of the output string.
  
      Returns:
          A byte string containing the data from bn of length "size"
  
      """
      if bn is None:
          return None
  
      data = ctypes.create_string_buffer(size)
      offset = size - BN_num_bytes(bn)
  
      ret = _ssl.BN_bn2bin(bn, ctypes.byref(data, offset))
      if ret == 0:
          return None
  
      for i in range(offset):
          data[i] = 0
  
      return data.raw[:size]
function_tokens: def BNToBin ( bn , size ) : if bn is None : return None data = ctypes . create_string_buffer ( size ) offset = size - BN_num_bytes ( bn ) ret = _ssl . BN_bn2bin ( bn , ctypes . byref ( data , offset ) ) if ret == 0 : return None for i in range ( offset ) : data [ i ] = 0 return data . raw [ : size ]