Reversible shuffling a int array in java -
this question has answer here:
- reversible shuffle algorithm using key 4 answers
i have int array of considerably large size. need shuffle array using key. should able obtain original array using same key. searched shuffle algorithms 1 found fisher yates not use key.
the int array pixel values of image. need hide data it. hiding data after shuffling array enables accessing of data if 1 have key.
fisher-yates uses pseudo-random number generator, can seed using key (look cryptographic prngs). reverse process, shuffle array of indices [0, n) using same key, perform reverse shuffle.
Comments
Post a Comment