-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to represent integer attributes? #27
Comments
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?
The text was updated successfully, but these errors were encountered: