pauldorman/clj-ldap — pull request #2 by cowlike (2012-02-19 19:03:49+00:00)
Title: base64 encoding of binary data

https://github.com/cowlike/clj-ldap/commit/027337ec7633f6df37af1fc6f40eaaec8f45d057#commitcomment-982879

I made a small change to base64 encode single valued attributes that contain binary data. The underlying library, UnboundID, has a function needsBase64Encoding() to determine that. Converting to a string, the default behavior when you're inserting into the map, ends up corrupting the data since it's not a string of any particular encoding.

This isn't a great solution since I'm using an internal Sun class but the function I found in contrib did not result in a usable encoded string that I could use to generate a dynamic image from data pulled out of Active Directory. I'm still not quite sure why that is but I wanted to let you know about this anyway.