Disco.Services.Interop.ActiveDirectory.ADHelpers.ToBinaryString C# (CSharp) Method

ToBinaryString() static private method

static private ToBinaryString ( this Sid ) : string
Sid this
return string
        internal static string ToBinaryString(this SecurityIdentifier Sid)
        {
            StringBuilder escapedSid = new StringBuilder();

            foreach (var sidByte in Sid.ToBytes())
            {
                escapedSid.Append('\\');
                escapedSid.Append(sidByte.ToString("x2"));
            }

            return escapedSid.ToString();
        }