|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.hermesftp.utils.SecurityUtil
public final class SecurityUtil
Security related utility methods.
| Method Summary | |
|---|---|
static boolean |
checkPassword(java.lang.String passwordHash,
java.lang.String password)
Checks the validity of the password password based on a given hash code. |
static javax.net.ssl.SSLContext |
createSslContext(java.lang.String keyStoreFile,
char[] keyStorePassword)
Create the security context required for SSL communication. |
static java.lang.String |
digestPassword(java.lang.String password,
java.lang.String algorithm)
Calculates based on the passed parameters an hash code and returns its BASE64 representation. |
| 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 digestPassword(java.lang.String password,
java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException
password - The password to encode.algorithm - The algorithm to use (MD5 e.g.)
java.security.NoSuchAlgorithmException - Passed algorithm is not supported.
public static boolean checkPassword(java.lang.String passwordHash,
java.lang.String password)
throws java.security.NoSuchAlgorithmException
passwordHash - The hash code to check against.password - The password to check.
java.security.NoSuchAlgorithmException - Algorithm (from hash prefix) is not supported.
public static javax.net.ssl.SSLContext createSslContext(java.lang.String keyStoreFile,
char[] keyStorePassword)
throws FtpConfigException
keyStoreFile - The name of the keystore file.keyStorePassword - The password for the keystore.
FtpConfigException - Thrown on error in configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||