Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Encrypt and Decrypt for text ...

Reply
Thread Tools

Encrypt and Decrypt for text ...

 
 
stratus
Guest
Posts: n/a
 
      02-10-2004
Is there any share tools in Unix,or even in PERL for encrypting the
ascii text to binary or anything else and decrypting it to ascii text.
Thanks a lot !!!

Or can tell me how to do it !!

 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      02-10-2004

"stratus" <> wrote in message
news:c099ku$166k$...
> Is there any share tools in Unix,or even in PERL for encrypting the
> ascii text to binary or anything else and decrypting it to ascii text.
> Thanks a lot !!!
>


We don't deal in shareware here (and it's "are there" not "is there", and
Perl, not PERL). That you would even ask if such tools exists probably means
this is going to fall on deaf ears, but there are many modules on cpan that
deal with encrypting and decrypting all kinds of data.

Matt


 
Reply With Quote
 
 
 
 
James Willmore
Guest
Posts: n/a
 
      02-10-2004
On Tue, 10 Feb 2004 00:46:22 +0000, stratus wrote:

> Is there any share tools in Unix,or even in PERL for encrypting the
> ascii text to binary or anything else and decrypting it to ascii text.
> Thanks a lot !!!
>
> Or can tell me how to do it !!


Converting (*not* encrypting) ASCII text to a binary format is *not* going
to hide your code (I'm thinking this was the point of your post, right?).

perldoc -q 'hide'

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Make it myself? But I'm a physical organic chemist!


 
Reply With Quote
 
Gregory Toomey
Guest
Posts: n/a
 
      02-10-2004
stratus wrote:

> Is there any share tools in Unix,or even in PERL for encrypting the
> ascii text to binary or anything else and decrypting it to ascii text.
> Thanks a lot !!!
>
> Or can tell me how to do it !!


Assuming you are not trying to do anything naughty, search for "symmetric
encryption".
http://www.webopedia.com/TERM/S/symm...ncryption.html

The best known algorithm is DES
http://www.itl.nist.gov/fipspubs/fip46-2.htm


I have a quick-and-dirty Perl script that will encrypt a string of length s
into a longer string of length 2s, and a decryption routine that will take
the longer string and convert back to the original plaintext string.
You should be able to whip up something similar - just like baking a cake
but you invent your own recipe!

gtoomey
 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      02-11-2004
In article <Xns948BE9C5BE28Fnothing@209.98.50.131>,
Klaas <> wrote:
:Surely you jest? DES can be broken in a matter of hours.

Yes, it can be broken in a matter of hours -- if you devote several
thousand computers to the task. I would tend to doubt anyone would
bother for whatever the original poster intended to use the
encryption for.

Encryption doesn't have to be perfect: it just has to be good
enough to not be worth the bother of breaking.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest
 
Reply With Quote
 
Matt Garrish
Guest
Posts: n/a
 
      02-11-2004

"Klaas" <> wrote in message
news:Xns948BE9C5BE28Fnothing@209.98.50.131...
> After careful consideration, Gregory Toomey muttered:
>
> > The best known algorithm is DES
> > http://www.itl.nist.gov/fipspubs/fip46-2.htm

>
> Surely you jest? DES can be broken in a matter of hours. AES is the
> current standard.
>


In all fairness, I think he meant best known in the sense of widely known,
not best available.

Matt


 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      02-12-2004

Klaas <> wrote:
> I agree. I was essentially objecting to the poster's characterizing DES
> as the best known algorithm (I should have realized he meant best-known).


Yay! Punctuation Pedants of the World Unite!

Ben

--
And if you wanna make sense / Whatcha looking at me for? (Fiona Apple)
* *
 
Reply With Quote
 
Matt Garrish
Guest
Posts: n/a
 
      02-12-2004

"Ben Morrow" <> wrote in message
news:c0em79$ish$...
>
> Klaas <> wrote:
> > I agree. I was essentially objecting to the poster's characterizing DES
> > as the best known algorithm (I should have realized he meant

best-known).
>
> Yay! Punctuation Pedants of the World Unite!
>


Our long-awaited call to arms! Quick, everyone to the Tower of Babel! : )

Matt


 
Reply With Quote
 
David K. Wall
Guest
Posts: n/a
 
      02-12-2004
(Walter Roberson) wrote:

> Encryption doesn't have to be perfect: it just has to be good
> enough to not be worth the bother of breaking.


($encrypted = $plaintext) =~ tr/A-Za-z/N-ZA-Mn-za-m/;

is often good enough...

In meetings, I often use runes from The Hobbit to make notes such as "This
person is just pushing their pet project" or "This is boring".

 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      02-12-2004
David K. Wall <> wrote:
> (Walter Roberson) wrote:
>
>> Encryption doesn't have to be perfect: it just has to be good
>> enough to not be worth the bother of breaking.

>
> ($encrypted = $plaintext) =~ tr/A-Za-z/N-ZA-Mn-za-m/;
>
> is often good enough...



And if the data is really really secret, encode it as above twice!





--
Tad McClellan SGML consulting
Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
decrypt challenge - perl encrypt with ruby decrypt aktxyz@gmail.com Ruby 1 06-16-2007 01:30 PM
how to encrypt a C data and write a bin file and read a bin at run time and decrypt C data sweety C Programming 9 02-07-2006 05:28 PM
Can one make up one's own cookie encrypt and decrypt keys? Randall Parker ASP .Net 0 12-04-2005 06:55 PM
FormsAuthentication.Encrypt and Decrypt not playing nicely =?Utf-8?B?TWlrZQ==?= ASP .Net 0 08-31-2005 07:59 PM
Can you encrypt and decrypt CDs and CDRWs ? Allen Computer Support 0 10-20-2004 08:14 AM



Advertisments