mobeets / bpcs

digital image steganography using BPCS (Bit-Plane Complexity Segmentation Steganography)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot encode character

aquamarine01 opened this issue · comments

Hello sir,

Currently I am experimenting by combining AES file encryption (cryptography) and BPCS (steganography) for better data security on Jupyter Notebook. All went smooth, until i want to decode the encfile (image with encrypted file in it). It says :

UnicodeEncodeError: 'charmap' codec can't encode character '\x92' in position 309: character maps to

Can you help me fix this issue? i guess there is a problem in Notebook but i cannot figure it out

commented

Could you give me more info on where the error is getting thrown from, like which line in the code?

image

this is what error looks like

my flow of works are :

  1. I encrypt a file (i use PDF file, for now) using AES algorithm, making the file appears "corrupt" but actually it is just encrypted
  2. I embed the encrypted file into image using BPCS, it went smooth and no problem
  3. When i try to extract the encrypted file from the stego-image, the error appears

The error positions sometimes will change, depending on the encrypted file. I suspect there is a problem in Unicode where the encrypted files written in "unknown" or "obsolete" like CP1252 or something else. This is just my assumption though.

commented

Looks like you are using an older version of the code from like 2 years ago! Just get the current version and this should run fine.

sorry, but i cannot see the "latest version" you mean. What i see is the repo that updated 3 years ago

never mind, just found out that i should move array_message.py to bpcs folder. Thanks.

commented

Ah, apologies! You are very right, that file should replace the one inside the bpcs folder. Whoever did that PR must have accidentally put that file in the wrong place. Glad it's working now.

Fixed now in the repo too.