|
From: adrian g. <adr...@gm...> - 2008-10-08 02:58:38
|
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[1] is the hash value
# concatenation
combineHex = previousPCRValue + lineArray[1]
# change to binary
combineBinary = binascii.unhexlify(combineHex)
# hash it
computedHash = hashlib.sha1(combineBinary)
# change it to hex
previousPCRValue = computedHash.hexdigest()
|