if (rs.next()) {
Reader pwdReader = rs.getCharacterStream(1);
final char[] pwd = extractFromReader(pwdReader);
final byte[] pwdB = Utility.convertCharArrayToByteArray(pwd,null);
if (getProperty(PARAM_DIGEST_PASSWORD_ENC_ALGORITHM) == null) {
return new Password() {
public byte[] getValue() {
return pwdB;
}
public int getType() {
return Password.PLAIN_TEXT;
}
public String getAlgorithm() {
return null;
}
};
} else {
return new Password() {
public byte[] getValue() {
if(getProperty(PARAM_ENCODING).equals(HEX)) {
return hexDecode(pwd);
}