Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   simple encryption/decryption (http://www.velocityreviews.com/forums/t890262-simple-encryption-decryption.html)

stig 01-18-2005 02:27 PM

simple encryption/decryption
 
hi.
which perl-module(s) can be used to implement very simple
encryption/decryption of arbitrary length strings?
it does not need to very secure but must be able to encrypt and decrypt
(not only one way).

for various reasons Crypt::Simple will not be a possible choice, are
there any other modules that you can recommend?

many thanks
stig

Josef Moellers 01-18-2005 03:38 PM

Re: simple encryption/decryption
 
stig wrote:
> hi.
> which perl-module(s) can be used to implement very simple
> encryption/decryption of arbitrary length strings?
> it does not need to very secure but must be able to encrypt and decrypt
> (not only one way).


If you do not require it to be "very secure", you do not require it to
bescure at all, so either use strong encryption or use no encryption at all.

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett


Ken 01-18-2005 04:31 PM

Re: simple encryption/decryption
 
stig wrote:
> hi.
> which perl-module(s) can be used to implement very simple
> encryption/decryption of arbitrary length strings?
> it does not need to very secure but must be able to encrypt and decrypt
> (not only one way).
>
> for various reasons Crypt::Simple will not be a possible choice, are
> there any other modules that you can recommend?
>
> many thanks
> stig


What about Crypt::Simple doesn't work for you?

Crypt::Blowfish is a good encryption algorythm to use.

If your strings are longer than 8 bytes you will need to use Crypt::CBC
along with the encryption module. You can also use Crypt::CBCeasy to
make things a little easier.


Ken


nospam@geniegate.com 02-18-2005 03:37 PM

Re: simple encryption/decryption
 
In: <csj6h7$nc7$1@oden.abc.se>, stig <_nospam_stigerikson@yahoo.se> wrote:
>hi.
>which perl-module(s) can be used to implement very simple
>encryption/decryption of arbitrary length strings?
>it does not need to very secure but must be able to encrypt and decrypt
>(not only one way).
>
>for various reasons Crypt::Simple will not be a possible choice, are
>there any other modules that you can recommend?
>
>many thanks
>stig


y/A-Za-z/N-ZA-Mn-za-m/;

Works both ways, plus it's really simple! :-)

You could also just XOR the data and back again.. a bit more "secure" than
above, but still fairly simple and easily broken. (Kid-sister scrambling unless
you've got a secure channel to transfer the XOR chunk back and forth, AND are
able to generate a new key each time, AND those keys are identical in length to
the original data) It'd probably work to keep grep from finding your string
though.

Jamie
--
http://www.geniegate.com Custom web programming
guhzo_42@lnubb.pbz (rot13) User Management Solutions


All times are GMT. The time now is 02:14 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.