Skip to content

Instantly share code, notes, and snippets.

View lorenzobn's full-sized avatar

LorenzoB. lorenzobn

View GitHub Profile
@lorenzobn
lorenzobn / hide_data.py
Last active September 11, 2021 08:12
Snippet taken from main.py with a focus on LSB hiding function
start_pixel = get_num_rand(used_pixels, num_of_pixels)
while byte_written != len(input_data):
bit_i = 0
while bit_i != 8:
px = matrix[start_pixel]
# colors: Red, Green and Blue
for c in range(conf[0], conf[1]):
if bit_i == 8:
break
# Because of Least Significant Bit, we want to modify the last bit of every color