INNER CODE UNIT · Python

run_hide_gems

CYBERGEM777/HIDEAGEM · HIDEAGEM.py:132

def run_hide_gems(args):

    # Load the ocean as a byte array directly
    with open(args.ocean, 'rb') as file:
        ocean_bytes = file.read()

    ocean_size = len(ocean_bytes)
    mutable_array = (ctypes.c_char * len(ocean_bytes)).from_buffer(bytearray(ocean_bytes))
    ocean_ptr = ctypes.cast(mutable_array, ctypes.POINTER(ctypes.c_void_p))

    # Convert list of paths to C-compatible array of byte strings
    files = [f.encode('utf-8') for f in args.files]
    arr = (ctypes.c_char_p * len(files))(*files)

    password_c = b''

    if args.password is not None:
        password_c = args.password.encode()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…