Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Laika/Toyotama into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Laika committed Nov 23, 2024
2 parents dda86a3 + b2bb110 commit c224db6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions toyotama/crypto/rng.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from functools import reduce
from logging import getLogger
from math import gcd
from pathlib import Path

logger = getLogger(__name__)

Expand Down Expand Up @@ -33,8 +34,8 @@ def lcg_crack(x, a=None, b=None, m=None):


class LibcRandom:
def __init__(self, libc_path: str = "libc.so.6"):
self.libc = ctypes.cdll.LoadLibrary(libc_path)
def __init__(self, libc_path: Path = Path("libc.so.6")):
self.libc = ctypes.cdll.LoadLibrary(str(libc_path))
self.libc.srand.argtypes = [ctypes.c_uint]
self.libc.srand.restype = None
self.libc.rand.argtypes = []
Expand Down

0 comments on commit c224db6

Please sign in to comment.