dimanche 17 octobre 2021

How shuffle and then unshuffle a bytearray, given a key as seed

I am trying to create an encryption system, and for that I will be taking a bytearray, and I intend to use a

random.Random(seed).shuffle(bytearray)

function to encrypt the information.

I'm having trouble reversing this process for the deencryption, i tried something like (didnt work) :

random.Random(1/seed).shuffle(encryptedbytearray)

Is there anyway to do this?




Aucun commentaire:

Enregistrer un commentaire