Encrypt and Decrypt for text ...

S

stratus

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 !!
 
M

Matt Garrish

stratus said:
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
 
J

James Willmore

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!
 
G

Gregory Toomey

stratus said:
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/symmetric_encryption.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
 
W

Walter Roberson

: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.
 
M

Matt Garrish

Klaas said:
After careful consideration, Gregory Toomey muttered:


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
 
B

Ben Morrow

Klaas said:
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
 
M

Matt Garrish

Ben Morrow said:
best-known).

Yay! Punctuation Pedants of the World Unite!

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

Matt
 
D

David K. Wall

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".
 
T

Tad McClellan

David K. Wall said:
($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!


:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top