On Wed, Oct 8, 2008 at 10:58 AM, adrian golding <firstname.lastname@example.org>
i am trying to write a simple python script to verify my measurements list with PCR10 but it doesn't match. Anybody see the mistake?
thank you - adrian
previousPCRValue = "0000000000000000000000000000000000000000"
for line in obtainedFile.readlines():
lineArray = str.split(line)
# using ascii measurements file, lineArray is the hash value
combineHex = previousPCRValue + lineArray
# change to binary
combineBinary = binascii.unhexlify(combineHex)
# hash it
computedHash = hashlib.sha1(combineBinary)
# change it to hex
previousPCRValue = computedHash.hexdigest()