def _borromean_hash(m,e,i,j, H):
    """
    All params are bytes.
    
    m: bytes     message
    e: bytes     point
    i: int       ring index
    j: int       secret index
    """
    i = int(i).to_bytes(4,'big')
    j = int(j).to_bytes(4,'big')              
    sha256 = H()
    sha256.update(e)
    sha256.update(m)
    sha256.update(i)
    sha256.update(j)
    d = sha256.digest()
    return d