Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: how to handle comparison of binary type attributes in LDAP

by perlknight (Pilgrim)
on Feb 21, 2007 at 03:17 UTC ( #601254=note: print w/ replies, xml ) Need Help??


in reply to Re: how to handle comparison of binary type attributes in LDAP
in thread how to handle comparison of binary type attributes in LDAP

It's comparing LDAP entries from two servers. It could be a comparison between Primary and secondary or two LDAP server in different environment, e.g: DEV,QA,PROD. I got this written already, but as I analyze the result I noticed the Binary type is throwing me off track when I do a comparison. Hence I thought I could avoid by just doing length equality comparison on the value. BTW, what is an XY problem?


Comment on Re^2: how to handle comparison of binary type attributes in LDAP
Re^3: how to handle comparison of binary type attributes in LDAP
by idsfa (Vicar) on Feb 21, 2007 at 03:56 UTC

    (Read the link in my earlier post for several good explanations of the XY problem)

    Comparing the length only doesn't help if , for example, your binary data is a set of bit flags ... the value is important, too. I'd recommend MIME::Base64 encoding each value before comparing (neatly sidestepping the question of whether or not the original was binary).


    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://601254]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-08-01 05:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls