Here is the HEX rearranging UDF and it works beeyootifully.

http://www.cflib.org/udf.cfm?ID=705

M!ke 

-----Original Message-----
From: Brian Dumbledore [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 10:55 AM
To: CF-Talk
Subject: Re: how to retrieve objectguid (LDAP) in a legible format

Ok.. Here is what I found... There IS a way to retrieve objectguid in a
legible format.

I am using cf 7

first thing you NEED to do is in the attributes list you give the
objectguid.
Then use RETURNASBINARY option for the tag and AGAIN give objectguid
there.
Doing so, you are basically telling what attributes in the attributes
list you mentioned need to be returned as binary. 

Do this and the objectguid returned satisfies the isBinary()check. So
you now have a binary object that coldfusion understands.

Now, I did a binaryencode(objectguid,"HEX") and finally go the object in
its legible glory. 

HOWEVER, here is what I noticed. For those using Softterra's ldap
administrator (that's what I am using), what you see in the admin and
what you get as hex after binaryencode()ing is different (sort of).

The last 64 bits are intact, in the first 64 however, there seems to be
a bit of shuffling (don't know which side does this, the ldapadmin or
CF).

Here is what happens in the first 8 bytes.
B1 B2 B3 B4 B5 B6 B7 B8  (ldapadmin)
is seen as
B4 B3 B2 B1 B6 B5 B8 B7   (binaryencode()) 

Can anyone please confirm this? 
Anyway since this is just bit shuffling, we do have a unique id which is
always guaranteed to be unique.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245008
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to