mirror of
https://github.com/NinjaCheetah/libWiiPy.git
synced 2025-04-26 05:11:02 -04:00
Added commonkey.py
This commit is contained in:
parent
f50f80d69d
commit
397c2a8e38
17
src/libWiiPy_NinjaCheetah/commonkey.py
Normal file
17
src/libWiiPy_NinjaCheetah/commonkey.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from .shared import hex_string_to_byte_array
|
||||||
|
|
||||||
|
|
||||||
|
class CommonKey:
|
||||||
|
def __init__(self):
|
||||||
|
self.default_key = "ebe42a225e8593e448d9c5457381aaf7"
|
||||||
|
self.korean_key = "63b82bb4f4614e2e13f2fefbba4c9b7e"
|
||||||
|
self.vwii_key = "30bfc76e7c19afbb23163330ced7c28d"
|
||||||
|
|
||||||
|
def get_default_key(self):
|
||||||
|
return hex_string_to_byte_array(self.default_key)
|
||||||
|
|
||||||
|
def get_korean_key(self):
|
||||||
|
return hex_string_to_byte_array(self.korean_key)
|
||||||
|
|
||||||
|
def get_vwii_key(self):
|
||||||
|
return hex_string_to_byte_array(self.vwii_key)
|
@ -1,2 +0,0 @@
|
|||||||
def add_one(number):
|
|
||||||
return number + 1
|
|
9
src/libWiiPy_NinjaCheetah/shared.py
Normal file
9
src/libWiiPy_NinjaCheetah/shared.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
from typing import List
|
||||||
|
from binascii import unhexlify
|
||||||
|
|
||||||
|
|
||||||
|
def hex_string_to_byte_array(hex_string: str) -> List[int]:
|
||||||
|
byte_string = unhexlify(hex_string)
|
||||||
|
byte_array = list(byte_string)
|
||||||
|
|
||||||
|
return byte_array
|
Loading…
x
Reference in New Issue
Block a user