public static TPMPCRCompositeCore CreateFromTPMBlob(TPMBlob blob) { TPMPCRCompositeCore pcrComposite = new TPMPCRCompositeCore(); pcrComposite.ReadFromTpmBlob(blob); return(pcrComposite); }
public void CalculateDigests(GetPCRValueDelegate getPCRValue) { List<byte[]> pcrValues = new List<byte[]>(); for(uint i = 0; i<_pcrSelection.PcrSelection.BitCount; i++) { if(_pcrSelection.PcrSelection.GetBit((int)i)) { pcrValues.Add(getPCRValue(i)); } } TPMPCRCompositeCore composite = new TPMPCRCompositeCore(); composite.PCRSelection = _pcrSelection; composite.PCRValues = pcrValues.ToArray(); _digest = new HashProvider().Hash(new HashTPMBlobWritableDataProvider(composite)); }
public static TPMPCRCompositeCore CreateFromTPMBlob(TPMBlob blob) { TPMPCRCompositeCore pcrComposite = new TPMPCRCompositeCore(); pcrComposite.ReadFromTpmBlob(blob); return pcrComposite; }