Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
picture encryption
#1
(ironically zach just created an encryption thread)

i'm working on a picture encryption program where all of the pixels would be jumbled. i'm not to sure how original my little idea is, but the program would work like this:

you load a picture and enter a password (well, passnumber) and that number would get plugged into the random number generator like this:
RANDOMIZE (number)

then the program would go pixel by pixel:
Code:
for y = 0 to ymax
for x = 0 to xmax

and pick a random number between 0 and the max x/y of the picture. and swap the x,y with the "random" rx,ry.

now this isn't truly random, because you would know the seed number. so going backwards you could re-organize the original order of the pixels. if you don't understand (i don't blame you) look at what i have here: (and yes i'm aware i have a FOR...NEXT delay in there but i swear it's for debugging purpose only!)


Code:
screenres 320,200,32,2,1
input "Pass "; p#
for y = 0 to 99
for x = 0 to 99
  c = c + int(16777216 / (100*100))
  pset (x,y),c
next
next
sleep
ymax = 99
xmax = 99
randomize p#
for y = 0 to ymax
for x = 0 to xmax
rx = int(rnd*xmax)
ry = int(rnd*ymax)
pa = point(x ,y )
pb = point(rx,ry)
swap pa, pb
pset (x  ,y  ),pb
pset (rx ,ry ),pa
line (-1 ,-1 )-(100,100),0,b
pset (100,y  ),16777215
pset (x  ,100),16777215

for sa = 0 to 2000000:next
next
next
sleep
end

The problem is the pixels aren’t getting swapped. and i just know the answer is right under my nose
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply


Messages In This Thread
picture encryption - by Dio - 05-27-2006, 02:32 AM
picture encryption - by Neo - 05-27-2006, 02:40 AM
picture encryption - by Dio - 05-27-2006, 02:47 AM
picture encryption - by Neo - 05-27-2006, 02:49 AM
picture encryption - by Dio - 05-27-2006, 03:25 AM
picture encryption - by Neo - 05-27-2006, 03:36 AM
picture encryption - by Dio - 05-29-2006, 01:56 AM
picture encryption - by Zack - 05-29-2006, 10:10 PM
picture encryption - by Dio - 05-30-2006, 01:12 AM
picture encryption - by Anonymous - 05-30-2006, 04:57 AM
picture encryption - by Dio - 05-30-2006, 12:38 PM
picture encryption - by Dio - 05-30-2006, 12:41 PM
picture encryption - by Anonymous - 05-30-2006, 12:44 PM
picture encryption - by Dio - 05-31-2006, 12:40 AM
picture encryption - by Kylemc - 06-01-2006, 01:07 AM
picture encryption - by Dio - 06-01-2006, 12:43 PM
picture encryption - by marinedalek - 06-01-2006, 02:39 PM
picture encryption - by Neo - 06-01-2006, 03:08 PM
picture encryption - by Anonymous - 06-01-2006, 07:05 PM
picture encryption - by Zack - 06-01-2006, 07:47 PM
picture encryption - by Dio - 06-03-2006, 10:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)