void Unmarshal_TPMU_SIG_SCHEME(
	TSS2_SYS_CONTEXT *sysContext,
	TPMU_SIG_SCHEME *sigScheme,
	UINT32 selector
	)
{
	if( SYS_CONTEXT->rval != TSS2_RC_SUCCESS )
		return;

	if( sigScheme == 0 )
		return;

	switch( selector )
	{
#ifdef TPM_ALG_RSASSA
	case TPM_ALG_RSASSA:
			Unmarshal_TPMS_SIG_SCHEME_RSASSA( sysContext, &sigScheme->rsassa );
			break;
#endif
#ifdef TPM_ALG_RSAPSS
	case TPM_ALG_RSAPSS:
			Unmarshal_TPMS_SIG_SCHEME_RSAPSS( sysContext, &sigScheme->rsapss );
			break;
#endif
#ifdef TPM_ALG_ECDSA
	case TPM_ALG_ECDSA:
			Unmarshal_TPMS_SIG_SCHEME_ECDSA( sysContext, &sigScheme->ecdsa );
			break;
#endif
#ifdef TPM_ALG_ECDAA
	case TPM_ALG_ECDAA:
			Unmarshal_TPMS_SIG_SCHEME_ECDAA( sysContext, &sigScheme->ecdaa );
			break;
#endif
#ifdef TPM_ALG_SM2
	case TPM_ALG_SM2:
			Unmarshal_TPMS_SIG_SCHEME_SM2( sysContext, &sigScheme->sm2 );
			break;
#endif
#ifdef TPM_ALG_ECSCHNORR
	case TPM_ALG_ECSCHNORR:
			Unmarshal_TPMS_SIG_SCHEME_ECSCHNORR( sysContext, &sigScheme->ecschnorr );
			break;
#endif
#ifdef TPM_ALG_HMAC
	case TPM_ALG_HMAC:
			Unmarshal_TPMS_SCHEME_HMAC( sysContext, &sigScheme->hmac );
			break;
#endif
#ifdef TPM_ALG_NULL
	case TPM_ALG_NULL:
					break;
#endif
	}
	return;
}
void Unmarshal_TPMU_ASYM_SCHEME(
	TSS2_SYS_CONTEXT *sysContext,
	TPMU_ASYM_SCHEME *asymScheme,
	UINT32 selector
	)
{
	if( SYS_CONTEXT->rval != TSS2_RC_SUCCESS )
		return;

	if( asymScheme == 0 )
		return;

	switch( selector )
	{
#ifdef TPM_ALG_ECDH
	case TPM_ALG_ECDH:
			Unmarshal_TPMS_KEY_SCHEME_ECDH( sysContext, &asymScheme->ecdh );
			break;
#endif
#ifdef TPM_ALG_ECMQV
	case TPM_ALG_ECMQV:
			Unmarshal_TPMS_KEY_SCHEME_ECMQV( sysContext, &asymScheme->ecmqv );
			break;
#endif
#ifdef TPM_ALG_RSASSA
	case TPM_ALG_RSASSA:
			Unmarshal_TPMS_SIG_SCHEME_RSASSA( sysContext, &asymScheme->rsassa );
			break;
#endif
#ifdef TPM_ALG_RSAPSS
	case TPM_ALG_RSAPSS:
			Unmarshal_TPMS_SIG_SCHEME_RSAPSS( sysContext, &asymScheme->rsapss );
			break;
#endif
#ifdef TPM_ALG_ECDSA
	case TPM_ALG_ECDSA:
			Unmarshal_TPMS_SIG_SCHEME_ECDSA( sysContext, &asymScheme->ecdsa );
			break;
#endif
#ifdef TPM_ALG_ECDAA
	case TPM_ALG_ECDAA:
			Unmarshal_TPMS_SIG_SCHEME_ECDAA( sysContext, &asymScheme->ecdaa );
			break;
#endif
#ifdef TPM_ALG_SM2
	case TPM_ALG_SM2:
			Unmarshal_TPMS_SIG_SCHEME_SM2( sysContext, &asymScheme->sm2 );
			break;
#endif
#ifdef TPM_ALG_ECSCHNORR
	case TPM_ALG_ECSCHNORR:
			Unmarshal_TPMS_SIG_SCHEME_ECSCHNORR( sysContext, &asymScheme->ecschnorr );
			break;
#endif
#ifdef TPM_ALG_RSAES
	case TPM_ALG_RSAES:
			Unmarshal_TPMS_ENC_SCHEME_RSAES( sysContext, &asymScheme->rsaes );
			break;
#endif
#ifdef TPM_ALG_OAEP
	case TPM_ALG_OAEP:
			Unmarshal_TPMS_ENC_SCHEME_OAEP( sysContext, &asymScheme->oaep );
			break;
#endif
#ifdef TPM_ALG_NULL
	case TPM_ALG_NULL:
					break;
#endif
	}
	return;
}