Exemplo n.º 1
0
        public static TPMPCRSelectionCore CreateFromTPMBlob(TPMBlob blob)
        {
            TPMPCRSelectionCore pcrSelection = new TPMPCRSelectionCore();

            pcrSelection.ReadFromTpmBlob(blob);
            return(pcrSelection);
        }
Exemplo n.º 2
0
        public void ReadFromTpmBlob(TPMBlob blob)
        {
            _pcrSelection = TPMPCRSelectionCore.CreateFromTPMBlob(blob);
            byte[] digestAtRelease  = new byte[20];
            byte[] digestAtCreation = new byte[20];

            blob.Read(digestAtRelease, 0, 20);
            blob.Read(digestAtCreation, 0, 20);
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
 public static TPMPCRSelectionCore CreateFromTPMBlob(TPMBlob blob)
 {
     TPMPCRSelectionCore pcrSelection = new TPMPCRSelectionCore();
     pcrSelection.ReadFromTpmBlob(blob);
     return pcrSelection;
 }