mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-21 02:35:26 -04:00
Initial refactor commit
Added AMI UCP BIOS Extractor v2.0_a1 Added AMI BIOS Guard Extractor v4.0_a1
This commit is contained in:
parent
2029ffc8b7
commit
132457afda
14 changed files with 1240 additions and 731 deletions
13
common/checksums.py
Normal file
13
common/checksums.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
#coding=utf-8
|
||||
|
||||
# Get Checksum 16-bit
|
||||
def checksum16(data):
|
||||
chk16 = 0
|
||||
|
||||
for idx in range(0, len(data), 2):
|
||||
chk16 += int.from_bytes(data[idx:idx + 2], 'little')
|
||||
|
||||
chk16 &= 0xFFFF
|
||||
|
||||
return chk16
|
Loading…
Add table
Add a link
Reference in a new issue