How can I convert a string to OctetString (C #)?
3 answers
An OctetString
appears to be just a string, represented as an array of bytes (hence octets).
The MSDN page on Octet String Property Type (SID) provides the following example for writing an Octet string:
byte[] usrSID = (byte[])usr.Properties["objectSid"].Value;
usr.Properties["objectSid "].Clear();
usr.Properties["objectSid "].Value = usrSID;
usr.CommitChanges();
0
a source to share