Tpm2Lib.Tpm2.Hash C# (CSharp) Method

Hash() private method

private Hash ( byte data, TpmAlgId hashAlg, TpmHandle hierarchy, [ validation ) : byte[]
data byte
hashAlg TpmAlgId
hierarchy TpmHandle
validation [
return byte[]
        public byte[] Hash(
            byte[] data,
            TpmAlgId hashAlg,
            TpmHandle hierarchy,
            [SuppressMessage("Microsoft.Design", "CA1021")]
            out TkHashcheck validation
        )
        {
            Tpm2HashRequest inS = new Tpm2HashRequest();
            inS.data = data;
            inS.hashAlg = hashAlg;
            inS.hierarchy = hierarchy;
            TpmStructureBase outSBase;
            DispatchMethod(TpmCc.Hash, (TpmStructureBase) inS, typeof(Tpm2HashResponse), out outSBase, 0, 0);
            Tpm2HashResponse outS = (Tpm2HashResponse) outSBase;
            validation = outS.validation;
            return outS.outHash;
        }
        /// <summary>

Usage Example

Esempio n. 1
0
        int IEqualityComparer <byte[]> .GetHashCode(byte[] obj)
        {
            TkHashcheck validation;

            return(BitConverter.ToInt32(my_tpm.Hash(obj as byte[], TpmAlgId.Sha1, TpmRh.Owner, out validation), 0));
        }
All Usage Examples Of Tpm2Lib.Tpm2::Hash
Tpm2