(cls, data, return_tail=False)
| 176 | |
| 177 | @classmethod |
| 178 | def from_bytes(cls, data, return_tail=False): |
| 179 | revision, subauth_count = struct.unpack('<BB', data[:2]) |
| 180 | identifier_authority = struct.unpack('>Q', b'\x00\x00' + data[2:8])[0] |
| 181 | subauth_data = data[8:] |
| 182 | subauthorities = [struct.unpack('<L', subauth_data[4 * i : 4 * (i+1)])[0] |
| 183 | for i in range(subauth_count)] |
| 184 | sid = cls(revision, identifier_authority, subauthorities) |
| 185 | if return_tail: |
| 186 | return sid, subauth_data[4 * subauth_count :] |
| 187 | return sid |
| 188 | |
| 189 | |
| 190 | class ACE(object): |
no test coverage detected