Re: Encrypting Long Numbers
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 12, 2003
- 466 views
Try this CK: include sha1.e -- http://www16.brinkster.com/davitf/ include b64.e -- http://www.rapideuphoria.com/cgi-bin/asearch.exu?gen=3Don&keywords=3DLoma= x sequence t, fluff, txt -- I assume you send it as an ascii sequence: t=3D"12847-47844-37847-38475"=20 fluff=3D"Now CK would be real silly"&t[1..6]& "if he just left this here,"&t[7..12]& "instead of replacing it by"&t[13..18]& "something only he knows .."&t[19..23] txt=3Dencode64(sha_1(fluff)) printf(1,"%s\n",{txt}) -- ... send that back ... if not equal(decode64(txt),sha_1(fluff)) then puts(1,"error\n") end if if getc(0) then end if Providing no-one else knows what it is you do to build fluff (which obviously needs to be the same at both ends), that should be pretty tough to break. Pete