Tpm2Lib.TpmHash.AllOnesHash C# (CSharp) Method

AllOnesHash() public static method

Return a TpmHash of the specified algorithm with value set to 0x01010101... Note that this is not a 'real' hash value, but is the initialization value of some resettable PCR
public static AllOnesHash ( TpmAlgId alg ) : TpmHash
alg TpmAlgId
return TpmHash
        public static TpmHash AllOnesHash(TpmAlgId alg)
        {
            int len = CryptoLib.DigestSize(alg);
            var bb = new byte[len];
            for (int j = 0; j < bb.Length; j++)
            {
                bb[j] = 0xFF;
            }
            return new TpmHash(alg, bb);
        }