MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Encode, Get ...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94666] Re: Encode, Get ...
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Fri, 19 Dec 2008 07:25:12 -0500 (EST)
  • References: <gianu4$8fq$1@smc.vnet.net>

Ignacio Plazeta wrote:
>   Dear MathFriends
> 
> Surely I have miss out something; the following code
> 
>    SetDirectory[NotebookDirectory[]];
>    myKey = "xyz";
>    showFile = "1.bmp";
>    hiddenFile = "2.bmp";
>    Encode[showFile, hiddenFile, myKey]
>    Get[hiddenFile, myKey]
> 
> dosn't work the way I expected and returns, in the
> pink "Messages" windows:
> 
>     Syntax::sntxi: Incomplete expression; more input is needed.
>    (line 1 of "2.bmp")
> 
> Please, can you point the issue ?
> Thanks !!
> 
> Best regards.
> 
> Ignacio
> 
Assuming you want to encrypt an image as part of your package, this is 
possible by embedding the InputForm of an image in your .m file.

Execute something like:

Import["C:\\gifs\\Bluemarble.jpg"] // InputForm

Then modify the resulting output cell by adding myimage= at the front - 
which will make an input cell that assigns an image to the variable myimage.

Place the result in a .m file, and use Encode!

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Debugging Mathematica
  • Next by Date: Re: Definition of new distribution
  • Previous by thread: Re: Encode, Get ...
  • Next by thread: mathgroup query