internal SecurityDescriptor(byte[] bytes)
 {
     Control = (SECURITY_KEY_CONTROLS)BitConverter.ToUInt16(bytes, 0x02);
     OwnerOffset = BitConverter.ToUInt32(bytes, 0x04);
     GroupOffset = BitConverter.ToUInt32(bytes, 0x08);
     SACLOffset = BitConverter.ToUInt32(bytes, 0x0C);
     DACLOffset = BitConverter.ToUInt32(bytes, 0x10);
     Owner = NativeMethods.GetSubArray(bytes, OwnerOffset, 0x10);
     Group = NativeMethods.GetSubArray(bytes, GroupOffset, 0x0C);
     SACL = NativeMethods.GetSubArray(bytes, SACLOffset, 0x08);
     DACL = NativeMethods.GetSubArray(bytes, DACLOffset, 0x84);
 }
Пример #2
0
 internal SecurityDescriptor(byte[] bytes)
 {
     Control = (SECURITY_KEY_CONTROLS)BitConverter.ToUInt16(bytes, 0x02);
     OwnerOffset = BitConverter.ToUInt32(bytes, 0x04);
     GroupOffset = BitConverter.ToUInt32(bytes, 0x08);
     SACLOffset = BitConverter.ToUInt32(bytes, 0x0C);
     DACLOffset = BitConverter.ToUInt32(bytes, 0x10);
     Owner = Helper.GetSubArray(bytes, (int)OwnerOffset, 0x10);
     Group = Helper.GetSubArray(bytes, (int)GroupOffset, 0x0C);
     SACL = Helper.GetSubArray(bytes, (int)SACLOffset, 0x08);
     DACL = Helper.GetSubArray(bytes, (int)DACLOffset, 0x84);
 }
 internal SecurityDescriptor(byte[] bytes)
 {
     Control     = (SECURITY_KEY_CONTROLS)BitConverter.ToUInt16(bytes, 0x02);
     OwnerOffset = BitConverter.ToUInt32(bytes, 0x04);
     GroupOffset = BitConverter.ToUInt32(bytes, 0x08);
     SACLOffset  = BitConverter.ToUInt32(bytes, 0x0C);
     DACLOffset  = BitConverter.ToUInt32(bytes, 0x10);
     Owner       = NativeMethods.GetSubArray(bytes, OwnerOffset, 0x10);
     Group       = NativeMethods.GetSubArray(bytes, GroupOffset, 0x0C);
     SACL        = NativeMethods.GetSubArray(bytes, SACLOffset, 0x08);
     DACL        = NativeMethods.GetSubArray(bytes, DACLOffset, 0x84);
 }
Пример #4
0
 internal SecurityDescriptor(byte[] bytes)
 {
     Control     = (SECURITY_KEY_CONTROLS)BitConverter.ToUInt16(bytes, 0x02);
     OwnerOffset = BitConverter.ToUInt32(bytes, 0x04);
     GroupOffset = BitConverter.ToUInt32(bytes, 0x08);
     SACLOffset  = BitConverter.ToUInt32(bytes, 0x0C);
     DACLOffset  = BitConverter.ToUInt32(bytes, 0x10);
     Owner       = Helper.GetSubArray(bytes, (int)OwnerOffset, 0x10);
     Group       = Helper.GetSubArray(bytes, (int)GroupOffset, 0x0C);
     SACL        = Helper.GetSubArray(bytes, (int)SACLOffset, 0x08);
     DACL        = Helper.GetSubArray(bytes, (int)DACLOffset, 0x84);
 }