The easiest way to do a crypt with plain vanilla 4 funtion math is to turn
the string into a number, then divide the number by a large prime number.
Then take the decimal part of the answer, and truncate to the desired
length.

Marshall

"Martin A. Langhoff" wrote:

> hi list!
>
>     I'm guilty of being a self taught programmer, and so, from time to
> time, I find myself asking silly questions. Hope you don't mind too
> much.
>
>     [if you do, flame me privately, please ... lets keep my shame
> between the two of us]
>
>     ok, what I'm looking for is a poor man's crypt(). And a simple one,
> because whatever logic I use, I must reproduce in a limited proprietary
> language (Macromedia Director's "Lingo"). Lingo won't allow me to do bit
> math, 'xor' nor any sophisticated scheme. Plain math stuff and string
> manipulation.
>
>     On the other hand, neither the target audience nor the intended use
> is high end. It's just a quick lock to control the spreading of an app
> to no more than 100 users.
>     I won't be locking nuclear warheads with it :)
>
>     Is there any 'teaching book' example? Maybe a listmember with proper
> education can tell me?
>
> martin
> --                                                         --
> To understand recursion, one must first understand recursion.
> --                                                         --
>     - Martin Langhoff @ S C I M  Multimedia Technology -
>       - http://www.scim.net      | God is real until  -
>       - mailto:[EMAIL PROTECTED]  | declared integer   -

Reply via email to