private byte[] encryptedPasswordForUSRENCPWD(String password) throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(password, netAgent_), NetConfiguration.SECMEC_USRENCPWD, netAgent_.sourceCcsidManager_.convertFromUCS2(user_, netAgent_), targetPublicKey_); }
private byte[] encryptedPasswordForUSRENCPWD(String password) throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(password, netAgent_), NetConfiguration.SECMEC_USRENCPWD, netAgent_.sourceCcsidManager_.convertFromUCS2(user_, netAgent_), targetPublicKey_); }
final void maskOutPassword() { try { String maskChar = "*"; // construct a mask using the maskChar. StringBuilder mask = new StringBuilder(); for (int i = 0; i < passwordLength_; i++) { mask.append(maskChar); } // try to write mask over password. ccsidManager_.convertFromUCS2(mask.toString(), bytes_, passwordStart_, netAgent_); } catch (SqlException sqle) { // failed to convert mask, // them simply replace with 0xFF. for (int i = 0; i < passwordLength_; i++) { bytes_[passwordStart_ + i] = (byte) 0xFF; } } }
private byte[] encryptedUseridForEUSRIDPWD() throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(user_, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
final void writeScalarPaddedString(String string, int paddedLength) throws SqlException { int stringLength = string.length(); ensureLength(offset_ + paddedLength); offset_ = ccsidManager_.convertFromUCS2(string, bytes_, offset_, netAgent_); for (int i = 0; i < paddedLength - stringLength; i++) { bytes_[offset_++] = ccsidManager_.space_; } }
final void writeScalarString(int codePoint, String string) throws SqlException { int stringLength = string.length(); ensureLength(offset_ + stringLength + 4); bytes_[offset_++] = (byte) (((stringLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((stringLength + 4) & 0xff); bytes_[offset_++] = (byte) ((codePoint >>> 8) & 0xff); bytes_[offset_++] = (byte) (codePoint & 0xff); offset_ = ccsidManager_.convertFromUCS2(string, bytes_, offset_, netAgent_); }
private byte[] encryptedUseridForEUSRIDPWD() throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(user_, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
private byte[] encryptedPasswordForEUSRIDPWD(String password) throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(password, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
private byte[] encryptedPasswordForEUSRIDPWD(String password) throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(password, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
final void maskOutPassword() { try { String maskChar = "*"; // construct a mask using the maskChar. StringBuilder mask = new StringBuilder(); for (int i = 0; i < passwordLength_; i++) { mask.append(maskChar); } // try to write mask over password. ccsidManager_.convertFromUCS2(mask.toString(), bytes_, passwordStart_, netAgent_); } catch (SqlException sqle) { // failed to convert mask, // them simply replace with 0xFF. for (int i = 0; i < passwordLength_; i++) { bytes_[passwordStart_ + i] = (byte) 0xFF; } } }
final void writeScalarString(int codePoint, String string) throws SqlException { int stringLength = string.length(); ensureLength(offset_ + stringLength + 4); bytes_[offset_++] = (byte) (((stringLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((stringLength + 4) & 0xff); bytes_[offset_++] = (byte) ((codePoint >>> 8) & 0xff); bytes_[offset_++] = (byte) (codePoint & 0xff); offset_ = ccsidManager_.convertFromUCS2(string, bytes_, offset_, netAgent_); }
final void writeScalarPaddedString(int codePoint, String string, int paddedLength) throws SqlException { int stringLength = string.length(); ensureLength(offset_ + paddedLength + 4); bytes_[offset_++] = (byte) (((paddedLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((paddedLength + 4) & 0xff); bytes_[offset_++] = (byte) ((codePoint >>> 8) & 0xff); bytes_[offset_++] = (byte) (codePoint & 0xff); offset_ = ccsidManager_.convertFromUCS2(string, bytes_, offset_, netAgent_); for (int i = 0; i < paddedLength - stringLength; i++) { bytes_[offset_++] = ccsidManager_.space_; } }
final void writeScalarPaddedString(int codePoint, String string, int paddedLength) throws SqlException { int stringLength = string.length(); ensureLength(offset_ + paddedLength + 4); bytes_[offset_++] = (byte) (((paddedLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((paddedLength + 4) & 0xff); bytes_[offset_++] = (byte) ((codePoint >>> 8) & 0xff); bytes_[offset_++] = (byte) (codePoint & 0xff); offset_ = ccsidManager_.convertFromUCS2(string, bytes_, offset_, netAgent_); for (int i = 0; i < paddedLength - stringLength; i++) { bytes_[offset_++] = ccsidManager_.space_; } }
final void writeScalarPaddedString(String string, int paddedLength) throws SqlException { int stringLength = string.length(); ensureLength(offset_ + paddedLength); offset_ = ccsidManager_.convertFromUCS2(string, bytes_, offset_, netAgent_); for (int i = 0; i < paddedLength - stringLength; i++) { bytes_[offset_++] = ccsidManager_.space_; } }
final void writeDDMString(String s) throws SqlException { ensureLength(offset_ + s.length()); offset_ = ccsidManager_.convertFromUCS2(s, bytes_, offset_, netAgent_); }
final void writeDDMString(String s) throws SqlException { ensureLength(offset_ + s.length()); offset_ = ccsidManager_.convertFromUCS2(s, bytes_, offset_, netAgent_); }
prddtaLen += 4; prddtaLen = netAgent_.sourceCcsidManager_.convertFromUCS2(NetConfiguration.PRDID, prddta_, prddtaLen, netAgent_); prddtaLen = netAgent_.sourceCcsidManager_.convertFromUCS2(NetConfiguration.PRDDTA_PLATFORM_ID, prddta_, prddtaLen, netAgent_.sourceCcsidManager_.convertFromUCS2(extnam_.substring(0, extnamTruncateLength), prddta_, prddtaLen, netAgent_.sourceCcsidManager_.convertFromUCS2(user_.substring(0, userTruncateLength), prddta_, prddtaLen,
prddtaLen += 4; prddtaLen = netAgent_.sourceCcsidManager_.convertFromUCS2(NetConfiguration.PRDID, prddta_, prddtaLen, netAgent_); prddtaLen = netAgent_.sourceCcsidManager_.convertFromUCS2(NetConfiguration.PRDDTA_PLATFORM_ID, prddta_, prddtaLen, netAgent_.sourceCcsidManager_.convertFromUCS2(extnam_.substring(0, extnamTruncateLength), prddta_, prddtaLen, netAgent_.sourceCcsidManager_.convertFromUCS2(user_.substring(0, userTruncateLength), prddta_, prddtaLen,