|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.crypto.Crypto
public class Crypto
Cryptography utilities.
This static class is a port of the old Ph encryption code from C to Java.
Method Summary | |
---|---|
static java.lang.String |
crypt(java.lang.String str,
java.lang.String salt)
Encrypts a string using a salt. |
static java.lang.String |
encryptPassword(java.lang.String password)
Encrypts a password. |
static java.lang.String |
encryptPhChallenge(java.lang.String password,
java.lang.String challenge)
Encrypts the response to a Ph challenge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String crypt(java.lang.String str, java.lang.String salt)
This is the BSD "crypt" function ported to Java.
str
- The string to encrypt.salt
- The salt string.
public static java.lang.String encryptPassword(java.lang.String password)
The password is one-way encrypted by using the BSD "crypt" function to encrypt the password using itself as the salt.
password
- The password to be encrypted.
public static java.lang.String encryptPhChallenge(java.lang.String password, java.lang.String challenge)
password
- The password entered by the user.challenge
- The challenge sent by the Ph server.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |