提交 18385135 authored 作者: Thomas Mueller's avatar Thomas Mueller

StringUtils.convertBytesToHex

上级 da1d6bf7
......@@ -286,7 +286,7 @@ public class ConnectionInfo implements Cloneable {
private static byte[] hashPassword(boolean passwordHash, String userName, char[] password) {
if (passwordHash) {
return StringUtils.convertStringToBytes(new String(password));
return StringUtils.convertHexToBytes(new String(password));
}
if (userName.length() == 0 && password.length == 0 && SysProperties.EMPTY_PASSWORD) {
return new byte[0];
......
......@@ -370,10 +370,8 @@ public class Session extends SessionWithState {
this.lockTimeout = lockTimeout;
}
public CommandInterface prepareCommand(String sql, int fetchSize) {
synchronized (database) {
return prepareLocal(sql);
}
public synchronized CommandInterface prepareCommand(String sql, int fetchSize) {
return prepareLocal(sql);
}
/**
......
......@@ -158,9 +158,9 @@ public class User extends RightOwner {
}
if (password) {
buff.append(" SALT '").
append(StringUtils.convertBytesToString(salt)).
append(StringUtils.convertBytesToHex(salt)).
append("' HASH '").
append(StringUtils.convertBytesToString(passwordHash)).
append(StringUtils.convertBytesToHex(passwordHash)).
append('\'');
} else {
buff.append(" PASSWORD ''");
......
......@@ -491,7 +491,7 @@ public class FullText {
case Types.VARBINARY:
case Types.LONGVARBINARY:
case Types.BINARY:
return "'" + StringUtils.convertBytesToString((byte[]) data) + "'";
return "'" + StringUtils.convertBytesToHex((byte[]) data) + "'";
case Types.CLOB:
case Types.JAVA_OBJECT:
case Types.OTHER:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论