Hi pros,
I want to encrypt couple files in my project, and I was thinking about using
_some_ windows API to do this, but I can't seem to find any function in
WIN32API.HLP.
Can anybody help me with this?
TIA
Dezider
--
Dezider Gora
============================================================
mailto:gora@dopb.sk
"What's the best hardware platform for running Windows 98?
.
.
.
.
Slide projector.... :-)"
There is a crypto API in windows. If you have the MSDN cd/dvd there is a
partial book and it has an example of encrypting a file in C++ so it can be
done with it.
Allen
I want to encrypt couple files in my project, and I was thinking about using
_some_ windows API to do this
Thanx, I'll check it out. I hope I can use, 'cause I'm not a fan of C++....
Dezider
Allen Pollard wrote:
> There is a crypto API in windows. If you have the MSDN cd/dvd there is a
> partial book and it has an example of encrypting a file in C++ so it can be
> done with it.
> Allen
>
> I want to encrypt couple files in my project, and I was thinking about
> using
> _some_ windows API to do this
>
> ----------------------------------------
> Subscription maintenance at:
> http://leafe.com/mailListMaint.html
>
>
--
Dezider Gora
============================================================
mailto:gora@dopb.sk
"What's the best hardware platform for running Windows 98?
.
.
.
.
Slide projector.... :-)"
If you wanted string encrypt/decrypt I have a freeware com object for that
somewhere but file is not the same. I found a visual basic site with a
module for encryption that may help.
www.freevbcode.com
Might help
Allen
> Thanx, I'll check it out. I hope I can use, 'cause I'm not a fan of
C++....
Hi Florin
A consideration here is whether you want to be able to de-code the data.
An example is a users table, which contains an encrypted password. You never
want to decode the password, you want to compare the encrypted users
password against the value stored - a one way street, in other words.
To do this you can use sys(2007) to generate a checksum of the values, which
you can store in the table.
If you are going to want to decode the stored data, use something like Dae
suggested, which is secure but easily reversed. There is a reversible
encryption library out there somewhere (Tom Rettig's CIPHER.FLL?) if you
want something a bit meatier.
hth,
stuart
-----Original Message-----
From: Florin Marta [mailto:flmarta@romtelecomtm.ro]
Sent: 14 July 2000 16:34
To: Multiple recipients of ProFox
Subject: (No subject)
I'm looking for a way to encode the caracter fields in a table. Something
light, doesn't have to be rock solid, but enough to don't understand
anything with a browse. Does anybody has write code to do something like
this?
(English is not my 1st language :)
Florin Marta
"No amount of advance planning will ever replace dumb luck."
--Anonymous
Tom Rettig's CIPHER is at http://www.takenote.com/downloads.htm. It's in
the public domain.
Cindy Winegarden
Microsoft Certified Professional, Visual FoxPro
Duke Children's Information Systems
Duke University Medical Center
cindyw@duke.edu
----- Original Message -----
From: "Stuart Dunkeld" <Stuart.Dunkeld@eastsussexcc.gov.uk>
To: "Multiple recipients of ProFox" <profox@leafe.com>
Sent: Friday, July 14, 2000 11:57 AM
Subject: RE: Encryption of data (was no subject)
| Hi Florin
|
| A consideration here is whether you want to be able to de-code the data.
|
| An example is a users table, which contains an encrypted password. You
never
| want to decode the password, you want to compare the encrypted users
| password against the value stored - a one way street, in other words.
| To do this you can use sys(2007) to generate a checksum of the values,
which
| you can store in the table.
|
| If you are going to want to decode the stored data, use something like Dae
| suggested, which is secure but easily reversed. There is a reversible
| encryption library out there somewhere (Tom Rettig's CIPHER.FLL?) if you
| want something a bit meatier.
|
| hth,
|
| stuart
|
|
| -----Original Message-----
| From: Florin Marta [mailto:flmarta@romtelecomtm.ro]
| Sent: 14 July 2000 16:34
| To: Multiple recipients of ProFox
| Subject: (No subject)
|
|
| I'm looking for a way to encode the caracter fields in a table. Something
| light, doesn't have to be rock solid, but enough to don't understand
| anything with a browse. Does anybody has write code to do something like
| this?
| (English is not my 1st language :)
|
| Florin Marta
| "No amount of advance planning will ever replace dumb luck."
| --Anonymous
|
|
| ----------------------------------------
| Subscription maintenance at:
| http://leafe.com/mailListMaint.html
|
|
|
|
--------------B547AF6585ED90440B3A1B04
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Florin:
For something really simple but very effective try this:
function encypt
parameter lcP_line
lcEn_line = ""
for i = 1 to len(alltrim(lcP_line))
lcEn_line = lcEn_line + chr(asc(substr(lcP_line,i,1)) + 48)
endfor
return lcEn_line
function decrypt
parameter lcP_line
lcEn_line = ""
for i = 1 to len(alltrim(lcP_line))
lcEn_line = lcEn_line + chr(asc(substr(lcP_line,i,1)) - 48)
endfor
return lcEn_line
If you try this and browse the table you will see many characters that
all look the same but have different ASCII values.
HTH
Jack Skelley
skelley@newjerseydevils.com
Florin Marta wrote:
> I'm looking for a way to encode the caracter fields in a table.
> Something light, doesn't have to be rock solid, but enough to don't
> understand anything with a browse. Does anybody has write code to do
> something like this?(English is not my 1st language :) Florin Marta"No
> amount of advance planning will ever replace dumb luck."
> --Anonymous
--------------B547AF6585ED90440B3A1B04
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
<BODY BGCOLOR="#FFFFFF">
Florin:
<BR>For something really simple but very effective try this:
<BR>function encypt
<BR> parameter lcP_line
<BR> lcEn_line = ""
<BR> for i = 1 to len(alltrim(lcP_line))
<BR> lcEn_line = lcEn_line + chr(asc(substr(lcP_line,i,1))
+ 48)
<BR> endfor
<BR>return lcEn_line
<P>function decrypt
<BR> parameter lcP_line
<BR> lcEn_line = ""
<BR> for i = 1 to len(alltrim(lcP_line))
<BR> lcEn_line = lcEn_line + chr(asc(substr(lcP_line,i,1))
- 48)
<BR> endfor
<BR>return lcEn_line
<P>If you try this and browse the table you will see many characters that
all look the same but have different ASCII values.
<BR>HTH
<P>Jack Skelley
<BR>skelley@newjerseydevils.com
<BR>
<P>Florin Marta wrote:
<BLOCKQUOTE TYPE=CITE> <STYLE></STYLE>
<FONT SIZE=-1>I'm looking for
a way to encode the caracter fields in a table. Something light, doesn't
have to be rock solid, but enough to don't understand anything with a browse.
Does anybody has write code to do something like this?</FONT><FONT SIZE=-1>(English
is not my 1st language :)</FONT> <FONT SIZE=-1>Florin Marta</FONT><FONT SIZE=-1>"No
amount of advance planning will ever replace dumb luck."</FONT>
<BR><FONT SIZE=-1>--Anonymous</FONT></BLOCKQUOTE>
</BODY>
</HTML>
--------------B547AF6585ED90440B3A1B04--
Sorry i wasn't more clear.
I wanna be able to de-code the data. I wrote a program that use e-mail to
transmit a table from one point to another. The problem is that the users
who have Visual FoxPro now modify the table directly before sending it. This
should be done only from the program and causes me a lot of problems (at
destination the table is processed automaticly and invalid data may cause
unpleasant error messages).
Thank you all for your help
Florin Marta
----- Original Message -----
From: "Stuart Dunkeld" <Stuart.Dunkeld@eastsussexcc.gov.uk>
To: "Multiple recipients of ProFox" <profox@leafe.com>
Sent: Friday, July 14, 2000 5:57 PM
Subject: RE: Encryption of data (was no subject)
> Hi Florin
>
> A consideration here is whether you want to be able to de-code the data.
>
> An example is a users table, which contains an encrypted password. You
never
> want to decode the password, you want to compare the encrypted users
> password against the value stored - a one way street, in other words.
> To do this you can use sys(2007) to generate a checksum of the values,
which
> you can store in the table.
>
> If you are going to want to decode the stored data, use something like Dae
> suggested, which is secure but easily reversed. There is a reversible
> encryption library out there somewhere (Tom Rettig's CIPHER.FLL?) if you
> want something a bit meatier.
>
> hth,
>
> stuart
>
>
> -----Original Message-----
> From: Florin Marta [mailto:flmarta@romtelecomtm.ro]
> Sent: 14 July 2000 16:34
> To: Multiple recipients of ProFox
> Subject: (No subject)
>
>
> I'm looking for a way to encode the caracter fields in a table. Something
> light, doesn't have to be rock solid, but enough to don't understand
> anything with a browse. Does anybody has write code to do something like
> this?
> (English is not my 1st language :)
>
> Florin Marta
> "No amount of advance planning will ever replace dumb luck."
> --Anonymous
>
>
> ----------------------------------------
> Subscription maintenance at:
> http://leafe.com/mailListMaint.html
>
>
Hi
Then I'd suggest adding a field with a CRC using SYS(2007, field) so you
can verify that it hasn't been tampered with underway.
-Anders
----- Original Message -----
From: "Florin Marta" <flmarta@romtelecomtm.ro>
To: "Multiple recipients of ProFox" <profox@leafe.com>
Sent: Friday, July 14, 2000 8:11 PM
Subject: Re: Encryption of data (was no subject)
> Sorry i wasn't more clear.
> I wanna be able to de-code the data. I wrote a program that use e-mail to
> transmit a table from one point to another. The problem is that the users
> who have Visual FoxPro now modify the table directly before sending it.
This
> should be done only from the program and causes me a lot of problems (at
> destination the table is processed automaticly and invalid data may cause
> unpleasant error messages).
> Thank you all for your help
> Florin Marta
>
> ----- Original Message -----
> From: "Stuart Dunkeld" <Stuart.Dunkeld@eastsussexcc.gov.uk>
> To: "Multiple recipients of ProFox" <profox@leafe.com>
> Sent: Friday, July 14, 2000 5:57 PM
> Subject: RE: Encryption of data (was no subject)
>
>
> > Hi Florin
> >
> > A consideration here is whether you want to be able to de-code the data.
> >
> > An example is a users table, which contains an encrypted password. You
> never
> > want to decode the password, you want to compare the encrypted users
> > password against the value stored - a one way street, in other words.
> > To do this you can use sys(2007) to generate a checksum of the values,
> which
> > you can store in the table.
> >
> > If you are going to want to decode the stored data, use something like
Dae
> > suggested, which is secure but easily reversed. There is a reversible
> > encryption library out there somewhere (Tom Rettig's CIPHER.FLL?) if you
> > want something a bit meatier.
> >
> > hth,
> >
> > stuart
> >
> >
> > -----Original Message-----
> > From: Florin Marta [mailto:flmarta@romtelecomtm.ro]
> > Sent: 14 July 2000 16:34
> > To: Multiple recipients of ProFox
> > Subject: (No subject)
> >
> >
> > I'm looking for a way to encode the caracter fields in a table.
Something
> > light, doesn't have to be rock solid, but enough to don't understand
> > anything with a browse. Does anybody has write code to do something like
> > this?
> > (English is not my 1st language :)
> >
> > Florin Marta
> > "No amount of advance planning will ever replace dumb luck."
> > --Anonymous
> >
> >
> > ----------------------------------------
> > Subscription maintenance at:
> > http://leafe.com/mailListMaint.html
> >
> >
>
>
>
> ----------------------------------------
> Subscription maintenance at:
> http://leafe.com/mailListMaint.html
>
>
Author: Andy Davies
Posted: 2000-08-18 04:52:41 Link
Hi,
last night I was musing this topic over a few beers, and came up with this
illustration of the 'inaccessability' of large primes (say 100 digits to create
200 digit products). Any mathematicians Finish reading here!
One of the clasic ways of discovering primes is the 'Sieve of Erastothenes'. For
those who don't know it,this works quite well on a computer - you allocate one
bit for each integer in the range you choose. Set them all to 0, integer 1 is a
special case, 2 is 'known' to be a prime so set on every 2nd bit [1/2 of the
candidate set] (because multiples of a prime are by definition non-prime), three
is also a 'known' prime so set on every third bit [1/2 are already set so this
sets on 1/2 * 1/3 = 1/6 of the candidate set], 4 is exactly divisible by one of
the discoverd primes so is non-prime, 5 is prime so set off every 5th bit [2/6 *
1/5 = 1/15 of the candidate set]... and so on ..... One thing this shows is that
primes can be expected to become rarer as the integers increase in size - but
only very slowly and at a decreasing rate (approx. 25% primes in 100; 17% in
1,000; 12% in 10,000; 8% in a million...). So there will be plenty of primes in
the 100 digit range, but how to find them? This (at last <g>) is my
illustration:
If we use 'the Sieve' we will need somewhere to store our bit string. Now 10^100
bits is (say) 10^99 bytes. Suppose we give everyone in the world one or two
large (e.g. 100 gig) disk drives - we would have approx. 10^10 * 10^11 bytes
available = 10^21 of the 10^99 we need. So we need some more planets - about
10^78 of them. If every star in the universe had 10 planets, I don't think we'd
have anywhere near enough!
Cheers (_)? AndyD 8-)#
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster@notes.manchester.gov.uk
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************