Tpm2Lib.Tpm2.GetTpmInfo C# (CSharp) Method

GetTpmInfo() public static method

Get the date of the specification from which the TPM was built.
public static GetTpmInfo ( Tpm2 tpm, string &manufacturer, uint &year, uint &dayOfYear ) : void
tpm Tpm2
manufacturer string
year uint
dayOfYear uint
return void
        public static void GetTpmInfo(Tpm2 tpm, out string manufacturer, out uint year, out uint dayOfYear)
        {
            // ReSharper disable once RedundantAssignment
            manufacturer = "";
            year = GetProperty(tpm, Pt.Year);
            dayOfYear = GetProperty(tpm, Pt.DayOfYear);

            uint manX = GetProperty(tpm, Pt.Manufacturer);
            var arr = Marshaller.GetTpmRepresentation(manX);
            manufacturer = (new System.Text.UTF8Encoding()).GetString(arr, 0, arr.Length);
        }
Tpm2