|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mysql.jdbc.Security
Methods for doing secure authentication with MySQL-4.1 and newer.
| Method Summary | |
(package private) static byte[] |
createKeyFromOldPassword(java.lang.String passwd)
Creates key from old password to decode scramble Used in 4.1 authentication with passwords stored pre-4.1 hashing. |
(package private) static byte[] |
getBinaryPassword(int[] salt,
boolean usingNewPasswords)
DOCUMENT ME! |
(package private) static java.lang.String |
makeScrambledPassword(java.lang.String password)
Creates password to be stored in user database from raw string. |
(package private) static void |
passwordCrypt(byte[] from,
byte[] to,
byte[] password,
int length)
Encrypt/Decrypt function used for password encryption in authentication Simple XOR is used here but it is OK as we crypt random strings |
(package private) static byte[] |
passwordHashStage1(java.lang.String password)
Stage one password hashing, used in MySQL 4.1 password handling |
(package private) static byte[] |
passwordHashStage2(byte[] hashedPassword,
byte[] salt)
Stage two password hashing used in MySQL 4.1 password handling |
(package private) static byte[] |
scramble411(java.lang.String password,
java.lang.String seed)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
static byte[] getBinaryPassword(int[] salt,
boolean usingNewPasswords)
throws java.security.NoSuchAlgorithmException
salt - DOCUMENT ME!usingNewPasswords - DOCUMENT ME!
java.security.NoSuchAlgorithmException - if the message digest 'SHA-1' is not
available.
static byte[] createKeyFromOldPassword(java.lang.String passwd)
throws java.security.NoSuchAlgorithmException
passwd - the password to create the key from
java.security.NoSuchAlgorithmException - if the message digest 'SHA-1'
is not available.
static java.lang.String makeScrambledPassword(java.lang.String password)
throws java.security.NoSuchAlgorithmException
password - plaintext password
java.security.NoSuchAlgorithmException - if the message digest 'SHA-1' is not
available.
static void passwordCrypt(byte[] from,
byte[] to,
byte[] password,
int length)
from - IN Data for encryptionto - OUT Encrypt data to the buffer (may be the same)password - IN Password used for encryption (same length)length - IN Length of data to encrypt
static byte[] passwordHashStage1(java.lang.String password)
throws java.security.NoSuchAlgorithmException
password - plaintext password
java.security.NoSuchAlgorithmException - if the message digest 'SHA-1' is not
available.
static byte[] passwordHashStage2(byte[] hashedPassword,
byte[] salt)
throws java.security.NoSuchAlgorithmException
salt - salt used for stage two hashing
java.security.NoSuchAlgorithmException - if the message digest 'SHA-1' is not
available.
static byte[] scramble411(java.lang.String password,
java.lang.String seed)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||