本文整理汇总了C#中Parameters.GetValueOf方法的典型用法代码示例。如果您正苦于以下问题:C# Parameters.GetValueOf方法的具体用法?C# Parameters.GetValueOf怎么用?C# Parameters.GetValueOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parameters
的用法示例。
在下文中一共展示了Parameters.GetValueOf方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public override void Init(Parameters param, TPMProvider tpmProvider, TPMWrapper tpmWrapper)
{
base.Init (param, tpmProvider, tpmWrapper);
_param = param;
_capArea = param.GetValueOf<CapabilityData.TPMCapabilityArea> ("capArea");
}
示例2: Init
public override void Init(Parameters param, TPMProvider tpmProvider, TPMWrapper tpmWrapper)
{
base.Init (param, tpmProvider, tpmWrapper);
_digest = null;
_responseDigest = null;
if(param.IsDefined<byte[]>("externalData"))
_nonce = param.GetValueOf<byte[]>("externalData");
else
_nonce = NonceGenerator.GenerateByteNonce(20);
object myType = param.GetValueOf<object>("targetPCR");
_pcrSelection = param.GetValueOf<TPMPCRSelectionCore>("targetPCR");
}
示例3: Init
public override void Init(Parameters param, TPMProvider tpmProvider, TPMWrapper tpmWrapper)
{
base.Init (param, tpmProvider, tpmWrapper);
_digest = null;
_responseDigest = null;
_inData = param.GetValueOf<byte[]>("in_data");
}
示例4: Init
public override void Init(Parameters param, TPMProvider tpmProvider, TPMWrapper tpmWrapper)
{
base.Init (param, tpmProvider, tpmWrapper);
_digest = null;
_responseDigest = null;
_inData = TPMStoredDataCore.CreateFromBytes(param.GetValueOf<byte[]>("in_data"));
}
示例5: Init
public override void Init(Parameters param, TPMProvider provider, TPMWrapper tpmWrapper)
{
base.Init(param, provider, tpmWrapper);
_register = param.GetValueOf<UInt32>("pcrnum");
}
示例6: Init
public override void Init(Parameters param, TPMProvider tpmProvider, TPMWrapper tpmWrapper)
{
base.Init (param, tpmProvider, tpmWrapper);
_digest = null;
_responseDigest = null;
_inData = param.GetValueOf<byte[]>("in_data");
_pcrInfo = new TPMPCRInfoCore(new TPMPCRSelectionCore(param.GetValueOf<TPMPCRSelection>("pcr_selection")));
_pcrInfo.CalculateDigests((TPMPCRInfoCore.GetPCRValueDelegate)delegate(uint pcrNum)
{
//TODO: Use TPM_Quote to determine pcr values once it's available
Parameters pcrParams = new Parameters();
pcrParams.AddPrimitiveType("pcrnum", pcrNum);
TPMCommandResponse pcrResponse = _tpmWrapper.Process(new TPMCommandRequest(TPMCommandNames.TPM_CMD_PCRRead, pcrParams));
if(!pcrResponse.Status)
throw new TPMResponseException("An unknown error occured on performing pcrread");
return pcrResponse.Parameters.GetValueOf<byte[]>("value");
});
}
示例7: Init
public override void Init(Parameters param, TPMProvider tpmProvider, TPMWrapper tpmWrapper)
{
base.Init (param, tpmProvider, tpmWrapper);
_digest = null;
_tpmKey = TPMKeyCore.CreateFromBytes(param.GetValueOf<byte[]>("key_blob"));
}