Suppose I define h1 = '2bd5427c' h2 = '65ef24ab'
Then I can obtain their exclusive-or by first converting to an integer, and back again after: hex(ZZ(h1,16)^^ZZ(h2,16)) which produces the correct value '4e3a66d7' Is there a more direct way? In python, the operator ^ is supposed to implement x-or on strings, but of course in Sage that operator is recognized as an exponential, and so gives an error. Thanks, Alasdair -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
