Question: Ascii key value

Hello everyone, Im now doing my fyp project in cryptography. I need to encrypt a message by using genetic operator, mutation and crossover and decrypt it after that.

For example:

message:=elgamal;

m:=convert(message,bytes);

with(Bits):

for i from 1 to l do
bit[i]:=Split(M[i]);

end do;

After that I will use genetic operator to change some bit for each character.

The output I might get will be something like this [1,1,1,1,1,1,1] , after that I need to convert it back to Ascii key value by join function, but sometime it might exceed 127 which out of the range of Ascii key value. Any command can solve this problem or any method can be used which will not affect the original message? Thank you.

Please Wait...