Package org.ldaptive.ad
Class SecurityIdentifier
java.lang.Object
org.ldaptive.ad.SecurityIdentifier
Class to represent an active directory SID. Provides conversion from binary to string and vice versa.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static longgetLong(ByteBuffer buffer, boolean bigEndian) Reads a long from the supplied byte buffer.private static voidputLong(ByteBuffer buffer, long value, boolean bigEndian) Writes a long into the supplied byte buffer.static byte[]Converts the supplied SID to its binary format.static StringtoString(byte[] sid) Converts the supplied SID to its string format.
-
Constructor Details
-
SecurityIdentifier
private SecurityIdentifier()Default constructor.
-
-
Method Details
-
toString
Converts the supplied SID to its string format.- Parameters:
sid- to convert- Returns:
- string format of the SID
-
toBytes
Converts the supplied SID to its binary format.- Parameters:
sid- to convert- Returns:
- binary format of the SID
-
getLong
Reads a long from the supplied byte buffer. The byte buffer limit must be set appropriately by the caller.- Parameters:
buffer- to read long frombigEndian- whether to read the bytes as big endian- Returns:
- long value
-
putLong
Writes a long into the supplied byte buffer. The byte buffer limit must be set appropriately by the caller.- Parameters:
buffer- to write long tovalue- to writebigEndian- whether to write the bytes as big endian
-