Encrypt/Decrypt in fP
Laura Brody
laura at hvcomputer.com
Fri Nov 5 17:27:11 PST 2004
On Fri, 5 Nov 2004 19:07:53 -0500, Mike Rathburn <mike at datadoit.com> wrote:
> |-----Original Message-----
> |From: Laura Brody [mailto:laura at hvcomputer.com]
> |Sent: Friday, November 05, 2004 6:35 PM
> |To: mike at datadoit.com; filepro-list at seaslug.org
> |Subject: Re: Encrypt/Decrypt in fP
> |
> |For your project, you would want to do something like this:
> |
> |then: export expfile=(filename) ...
> |then: expfile(1) = 1
> |then: expfile(2) = 2
> | if: ' In this example, field 3 contains the tax ID number.
> |then: ' Strip out any - symbols with xlate, then convert to base 36.
> |then: expfile(3) = base(xlate(3,"-",""),"10","36")
> |then: expfile(4) = 4
> |
> |
> |For the import, just change the value back....
> |
> |then: import ifile=(filename) ....
> |then: 1 = ifile(1)
> |then: 2 = ifile(2)
> |then: 3 = base(ifile(3),"36","10")
> |
> |Few things in this world are this easy.
>
> Absolutely perfect! Yes, very easy. Thank you for your quick help.
Most developers totally forget some of the built-in
filePro functions that can turn something difficult into
something very, very trivial. A bunch of years ago, John Esak
needed to have note files with unique names, 8.3 windows
compatible names, that would cover all possible record
numbers. I suggested using BASE() to convert the record
number from base 10 to base 36 and adding ".txt" or something
at the end. It was the perfect solution to what he needed.
It took him longer to boot up his system than it took
him to add the BASE() code and finish that section of
his application.
Why did *I* remember this function? It might have
to do with the fact that I designed, coded and documented
the thing when I worked for SCC.....<g>. We added a whole
bunch of neat-o functions for versions 4.5 and 4.8. The
raw i/o, system arrays, financial functions, date functions
and trig functions were near impossible to write in filePro
processing. With the USER command, you could use unix
commands to send back the info you needed, but you were
s.o.l. when it came to Windows. I'm sure that we missed a
few functions, but overall I think that the processing
language in filePro v4.8 and higher open up some major
possibilities for developers.
--
Laura Brody, Publisher of the filePro Developer's Journal
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859 120 Sixth Street http://www.hvcomputer.com |
| Verplanck, NY 10596-0859 Voice mail: (914) 739-5004 |
+------ PC repair locally, filePro programming globally --------+
More information about the Filepro-list
mailing list