mirror of
https://github.com/grp/Wii.py.git
synced 2025-06-19 15:25:34 -04:00
Fixed spacing in hexdump()
This commit is contained in:
parent
303e0c379e
commit
98658b969d
@ -7,8 +7,8 @@ from Struct import Struct
|
|||||||
def align(x, boundary):
|
def align(x, boundary):
|
||||||
return x + (x % boundary)
|
return x + (x % boundary)
|
||||||
|
|
||||||
def hexdump(s,sep=" "):
|
def hexdump(s, sep=" "):
|
||||||
return sep.join(map(lambda x: "%02x"%ord(x),s))
|
return sep.join(map(lambda x: "%02x" % ord(x), s))
|
||||||
|
|
||||||
class Crypto:
|
class Crypto:
|
||||||
"""This is a Cryptographic/hash class used to abstract away things (to make changes easier)"""
|
"""This is a Cryptographic/hash class used to abstract away things (to make changes easier)"""
|
||||||
@ -22,7 +22,7 @@ class Crypto:
|
|||||||
else:
|
else:
|
||||||
return AES.new(titlekey, AES.MODE_CBC, iv).decrypt(data)
|
return AES.new(titlekey, AES.MODE_CBC, iv).decrypt(data)
|
||||||
def ValidateHash(self, data, hash):
|
def ValidateHash(self, data, hash):
|
||||||
"""Validates a hash. (BROKEN)"""
|
"""Validates a hash. Not checking currently because we have some...issues with hashes."""
|
||||||
return 1 #hack
|
return 1 #hack
|
||||||
# if(hashlib.sha1(data).hexdigest() == hexdump(hash, "")):
|
# if(hashlib.sha1(data).hexdigest() == hexdump(hash, "")):
|
||||||
# return 1
|
# return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user