A method for searching entries in a ternary content addressable memory
("TCAM") device for one or more matches to an input, comprising: (a)
providing a first portion of the input to the TCAM and receiving a first
indication from the TCAM as to whether the first portion matches one or
more of the entries in the TCAM; and, (b) if the first indication is
negative, providing a second portion of the input combined with a hashed
version of the first portion to the TCAM and receiving a second
indication from the TCAM as to whether the second portion combined with
the hashed version of the first portion matches one or more of the
entries in the TCAM.