Hello!

I would like to ask help from you about encrypt and decrypt. I actually have
here a simple code :

        static String crypto( String passwd, int offset )

                StringBuffer s_buff = new StringBuffer();
                for( int i = 0; i < passwd.length(); i++ ) {
                        s_buff.append( (char)( offset + passwd.charAt( i ) ) );
                }
                return sb.toString();
        }

        public Crypto( String password ) {
                int offset = 3;
                password = crypto( password, offset );
                System.out.println( "Password encyrpted as " + password );
                password = crypto(password, -offset );
              System.out.println( "Password decrypted to " + password );
        }


but as my boss said it is not acceptable because it is so simple to decode
the password back to the unencrypted one. I study the encryption algorithm
of UNIX but it is very hard to decrypt or return the unencrypted one. Does
anybody here have a the kind heart to share some code about encrypt and
decrypt that is much harder to the one I wrote?


Thanks.

-Sharon

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to