Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Locate the given `mark' in `payload' and return its index.

The `mark' is placed before the HMAC of a ScrambleSuit authentication
mechanism and makes it possible to efficiently locate the HMAC.  If the
`mark' could not be found, `None' is returned.

        def locateMark( mark, payload ):
    """
    Locate the given `mark' in `payload' and return its index.

    The `mark' is placed before the HMAC of a ScrambleSuit authentication
    mechanism and makes it possible to efficiently locate the HMAC.  If the
    `mark' could not be found, `None' is returned.
    """

    index = payload.find(mark)
    if index < 0:
        log.debug("Could not find the mark just yet.")
        return None

    if (len(payload) - index - const.MARK_LENGTH) < \
       const.HMAC_SHA256_128_LENGTH:
        log.debug("Found the mark but the HMAC is still incomplete.")
        return None

    log.debug("Successfully located the mark.")

    return index
        


src/o/b/obfsproxy-0.2.8/obfsproxy/transports/scramblesuit/scramblesuit.py   obfsproxy(Download)
                                        potentialTicket[:const.TICKET_LENGTH])
 
        index = util.locateMark(mark, potentialTicket)
        if not index:
            return False

src/o/b/obfsproxy-0.2.8/obfsproxy/transports/scramblesuit/uniformdh.py   obfsproxy(Download)
        mark = mycrypto.HMAC_SHA256_128(self.sharedSecret, publicKey)
 
        index = util.locateMark(mark, handshake)
        if not index:
            return False

src/s/c/scramblesuit-HEAD/scramblesuit.py   scramblesuit(Download)
                                        potentialTicket[:const.TICKET_LENGTH])
 
        index = util.locateMark(mark, potentialTicket)
        if not index:
            return False

src/s/c/scramblesuit-HEAD/uniformdh.py   scramblesuit(Download)
        mark = mycrypto.HMAC_SHA256_128(self.sharedSecret, publicKey)
 
        index = util.locateMark(mark, handshake)
        if not index:
            return False