A security identifier (SID) is an unique identifier, commonly used in Microsoft’s systems. For example, it’s used to identify users within Windows, or, more generally, within an Active Directory.
The SID is a binary value, with a variable length, that can be also be represented as a string. This conversion is implemented by the function called
ConvertSidToStringSid, provided by the library
Advapi32.dll, available only in Windows.
Hence, if you need to perform this conversion, you can procede with one of these two paths:
- Use Advapi32 (only in Windows)
- Rewrite the conversion