Tpm2Lib.TpmPolicyNV.GetPolicyDigest C# (CSharp) Method

GetPolicyDigest() private method

private GetPolicyDigest ( TpmAlgId hashAlg ) : TpmHash
hashAlg TpmAlgId
return TpmHash
        internal override TpmHash GetPolicyDigest(TpmAlgId hashAlg)
        {
            var m = new Marshaller();
            m.Put(OperandB, "operandB");
            m.Put(Offset, "offset");
            m.Put(Operation, "operation");
            byte[] args = CryptoLib.HashData(hashAlg, m.GetBytes());

            m = new Marshaller();
            m.Put(TpmCc.PolicyNV, "ord");
            m.Put(args, "args");
            m.Put(IndexName, "name");

            return GetNextAcePolicyDigest(hashAlg).Extend(m.GetBytes());
        }