Encryption

K

Kevin

I am trying to re-write a Perl program in Java (don't ask why ;-)

I am having problems finding Java equivalents for the Perl encode_base64,
used for encoding files for transmission, and crypt, used for encrypting
passwords, functions.

Can anyone help me?

There does seem to be some encryption support in Java but it isn't clear how
to use it in place of the Perl functions mentioned.

Cheers,
K
 
J

Juha Laiho

Kevin said:
I am having problems finding Java equivalents for the Perl encode_base64,
used for encoding files for transmission, and crypt, used for encrypting
passwords, functions.

For base64-encoding, it looks like Jakarta Commons Codec is the library
you're looking for. See http://jakarta.apache.org/commons/codec/ .
Other implementations also exist.

For the other; see what you get with
http://www.google.com/search?q=java+"unix+crypt"

For the "unix crypt" support, if you're after something that fills the
same functionality (one-way password hashing), but do not require
compatibility with the Unix crypt() -hashes, I'd recommend hashing
the passwords with either MD5 os SHA1 instead of the old DES-based
crypt().
 
S

Sudsy

Kevin said:
I am trying to re-write a Perl program in Java (don't ask why ;-)

I am having problems finding Java equivalents for the Perl encode_base64,
used for encoding files for transmission, and crypt, used for encrypting
passwords, functions.

Can anyone help me?

There does seem to be some encryption support in Java but it isn't clear how
to use it in place of the Perl functions mentioned.

Been there, done that, wrote an article which you can find here:
<http://www.sudsy.net/technology/pcrypto.html>
 

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

Forum statistics

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

Latest Threads

Top