コード例 #1
0
        private void ParsePacType(PacType type, byte[] infoBuffer, out int exclusionStart, out int exclusionLength)
        {
            exclusionStart  = 0;
            exclusionLength = 0;

            switch (type)
            {
            case PacType.LOGON_INFO:
                LogonInfo = new PacLogonInfo(infoBuffer);
                break;

            case PacType.CREDENTIAL_TYPE:
                CredentialType = new PacCredentialInfo(infoBuffer);
                break;

            case PacType.SERVER_CHECKSUM:
                ServerSignature = new PacSignature(infoBuffer, ref signatureData);

                exclusionStart  = ServerSignature.SignaturePosition;
                exclusionLength = ServerSignature.Signature.Length;
                break;

            case PacType.PRIVILEGE_SERVER_CHECKSUM:
                KdcSignature = new PacSignature(infoBuffer, ref signatureData);

                exclusionStart  = KdcSignature.SignaturePosition;
                exclusionLength = KdcSignature.Signature.Length;
                break;

            case PacType.CLIENT_NAME_TICKET_INFO:
                ClientInformation = new PacClientInfo(infoBuffer);
                break;

            case PacType.CONSTRAINED_DELEGATION_INFO:
                DelegationInformation = new PacDelegationInfo(infoBuffer);
                break;

            case PacType.UPN_DOMAIN_INFO:
                UpnDomainInformation = new UpnDomainInfo(infoBuffer);
                break;

            case PacType.CLIENT_CLAIMS:
                ClientClaims = new ClaimsSetMetadata(infoBuffer);
                break;

            case PacType.DEVICE_INFO:
                break;

            case PacType.DEVICE_CLAIMS:
                DeviceClaims = new ClaimsSetMetadata(infoBuffer);
                break;
            }
        }
コード例 #2
0
        private void ParsePacType(PacType type, byte[] data)
        {
            switch (type)
            {
            case PacType.LOGON_INFO:
                LogonInfo = new PacLogonInfo(data);
                break;

            case PacType.CREDENTIAL_TYPE:
                CredentialType = data;
                break;

            case PacType.SERVER_CHECKSUM:
                ServerSignature = new PacSignature(data);
                break;

            case PacType.PRIVILEGE_SERVER_CHECKSUM:
                KdcSignature = new PacSignature(data);
                break;

            case PacType.CLIENT_NAME_TICKET_INFO:
                ClientInformation = new PacClientInfo(data);
                break;

            case PacType.CONSTRAINED_DELEGATION_INFO:
                break;

            case PacType.UPN_DOMAIN_INFO:
                UpnDomainInformation = new UpnDomainInfo(data);
                break;

            case PacType.CLIENT_CLAIMS:
                ClientClaims = new ClaimsSetMetadata(data);
                break;

            case PacType.DEVICE_INFO:
                break;

            case PacType.DEVICE_CLAIMS:
                DeviceClaims = new ClaimsSetMetadata(data);
                break;
            }
        }