public PcrSelection PcrBank(PcrSelection[] pcrBanks, TpmAlgId hashAlg) { // The hash algorithm is not supported by Tpm2Tester if (!CryptoLib.IsSupported(hashAlg)) { return(null); } foreach (var pb in pcrBanks) { if (pb.hash == hashAlg) { return(pb); } } Globs.Throw("No PCR bank for hash algorithm " + hashAlg); return(null); }