Tpm2Lib.Tpm2.GetPcrProperty C# (CSharp) Method

GetPcrProperty() public static method

public static GetPcrProperty ( Tpm2 tpm, PtPcr prop ) : byte[]
tpm Tpm2
prop PtPcr
return byte[]
        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;
        }
Tpm2