public static byte[] GetPcrProperty(Tpm2 tpm, PtPcr prop)
{
ICapabilitiesUnion caps;
tpm.GetCapability(Cap.PcrProperties, (uint)prop, 1, out caps);
TaggedPcrSelect[] props = (caps as TaggedPcrPropertyArray).pcrProperty;
if (props.Length == 0)
{
return null;
}
if (props.Length != 1)
{
Globs.Throw("Unexpected return from GetCapability");
}
return props[0].pcrSelect;
}