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 String readFastString(int length) throws DisconnectException { String result = ccsidManager_.convertToUCS2(buffer_, pos_, length); pos_ += length; return result; }
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 String readFastString(int length) throws DisconnectException { String result = ccsidManager_.convertToUCS2(buffer_, pos_, length); pos_ += length; return result; }
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 String readString() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); String result = ccsidManager_.convertToUCS2(buffer_, pos_, len); pos_ += len; return result; }
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 String readString(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); String result = ccsidManager_.convertToUCS2(buffer_, pos_, length); pos_ += length; return result; }
private byte[] encryptedUseridForEUSRIDPWD() throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(user_, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
final String readString() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); String result = ccsidManager_.convertToUCS2(buffer_, pos_, len); pos_ += len; return result; }
private byte[] encryptedPasswordForEUSRIDPWD(String password) throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(password, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
final String readString(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); String result = ccsidManager_.convertToUCS2(buffer_, pos_, length); pos_ += length; return result; }
private byte[] encryptedPasswordForEUSRIDPWD(String password) throws SqlException { return encryptionManager_.encryptData(netAgent_.sourceCcsidManager_.convertFromUCS2(password, netAgent_), NetConfiguration.SECMEC_EUSRIDPWD, targetPublicKey_, targetPublicKey_); }
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_); }
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_; } }