Closed nitnelave closed 1 year ago
There are two options: https://www.rfc-editor.org/rfc/rfc4517#section-3.3.16 You can make it a integer here which is the output of i64 to_string() and then parsed.
Or you can use https://www.rfc-editor.org/rfc/rfc4517#section-3.3.25 and convert to a byte-array stored as an octet string, and then back again.
Generally if this was a uidNumber such as in posix, you would use the former integer-string method.
I'm looking to be as compatible as possible with common ldap tools, like ldapsearch. Would it make sense to add a int-to-byte-array conversion function in this repo? It would facilitate clients' life, I guess. Or is the "compatible" option the string representation?
compatible is the string representation from my experience.
Perfect, thanks.
Let's say I want to create a
LdapPartialAttribute
with a numerical value.How do I represent that 123 as bytes? Is there a special encoding necessary? Or do I convert it to i64 then do a cast to 8 raw bytes?