Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Mukul Sabharwal

http://www.paphe.com/php/tutorials/230101.php

an encryption class

=
*
Know more about me:
http://www.geocities.com/mimodit
*

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Andrey Hristov

ooops , sorry
On Friday 05 October 2001 18:48, you wrote:
> > On Friday 05 October 2001 18:10, you wrote:
> > > Use crypt()/decrypt() couple.
> > >
> > > Andrey Hristov
>
> From the PHP doumentation on crypt:
>
> There is no decrypt function, since crypt() uses a one-way algorithm." so
> that wouldn't have worked.
>
> Joel

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Joel Ricker




> On Friday 05 October 2001 18:10, you wrote:
> > Use crypt()/decrypt() couple.
> >
> > Andrey Hristov

>From the PHP doumentation on crypt:

There is no decrypt function, since crypt() uses a one-way algorithm." so
that wouldn't have worked.

Joel





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Joel Ricker

From: "Nathan" <[EMAIL PROTECTED]>

> Here are some simple xor encoding functions that I wrote. This will keep
> the average joe from peaking at your data.

Exactly what I was looking for.

Thanks
Joel



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Andrey Hristov

On Friday 05 October 2001 18:10, you wrote:
> Use crypt()/decrypt() couple.
>
> Andrey Hristov
> IcyGEN Corporation
> BUILDING SOLUTIONS
> http://www.icygen.com
>
> On Friday 05 October 2001 17:53, you wrote:
> > Here are some simple xor encoding functions that I wrote. This will keep
> > the average joe from peaking at your data.
> >
> > function decode($data){
> > $data = base64_decode($data);
> > /* XOR data */
> > for($i = 0; $i < strlen($data); $i++){
> > $data[$i] = ~ $data[$i];
> > }
> > return $data;
> > }
> >
> > function encode($data){
> > /* XOR data */
> > for($i = 0; $i < strlen($data); $i++){
> > $data[$i] = ~ $data[$i];
> > }
> > $data = base64_encode($data);
> > return $data;
> > }
> >
> > -----Original Message-
> > From: Joel Ricker [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 05, 2001 7:20 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] crypt and decrypt a string
> >
> >
> > Does anybody have an easy way to crypt and decrypt a string?  I see the
> > Mcrypt Encryption module but thats a little more gung-ho than I'm
> > looking for.  I'm not trying to encrypt sensitive data rather I'm more
> > trying obfuscate it a variable for a hidden tag.
> >
> > Thought I remember seeing something using XOR?  Any ideas?
> >
> > Thanks
> > Joel

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] crypt and decrypt a string

2001-10-05 Thread Nathan

Here are some simple xor encoding functions that I wrote. This will keep
the average joe from peaking at your data.

function decode($data){
$data = base64_decode($data);
/* XOR data */
for($i = 0; $i < strlen($data); $i++){
$data[$i] = ~ $data[$i];
}
return $data;
}

function encode($data){
/* XOR data */
for($i = 0; $i < strlen($data); $i++){
$data[$i] = ~ $data[$i];
}
$data = base64_encode($data);
return $data;
}

-Original Message-
From: Joel Ricker [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 05, 2001 7:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] crypt and decrypt a string


Does anybody have an easy way to crypt and decrypt a string?  I see the
Mcrypt Encryption module but thats a little more gung-ho than I'm
looking for.  I'm not trying to encrypt sensitive data rather I'm more
trying obfuscate it a variable for a hidden tag.

Thought I remember seeing something using XOR?  Any ideas?

Thanks
Joel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] crypt and decrypt a string

2001-10-05 Thread Joel Ricker

Does anybody have an easy way to crypt and decrypt a string?  I see the Mcrypt 
Encryption module but thats a little more gung-ho than I'm looking for.  I'm not 
trying to encrypt sensitive data rather I'm more trying obfuscate it a variable for a 
hidden tag.

Thought I remember seeing something using XOR?  Any ideas?

Thanks
Joel