Let F-n be the binary n-cube, or binary Hamming space of dimension n, endowed with the Hamming distance, and epsilon(n) (respectively, O-n) the set of vectors with even (respectively, odd) weight. For r >= 1 and x is an element of F-n, we denote by B-r (x) the ball of radius r and centre x. A code C subset of F-n n is said to be r-identifying if the sets B-r(x) boolean AND C, x is an element of F-n, are all nonempty and distinct. A code C subset of epsilon(n) is said to be r-discriminating if the sets B, (x) boolean AND C, x is an element of O-n, are all nonempty and distinct. We show that the two definitions, which were given for general graphs, are equivalent in the case of the Hamming space, in the following sense: for any odd r, there is a bijection between the set of r-identifying codes in F-n and the set of r-discriminating codes in Fn+l.