Пример #1
0
 public byte[] getContextEngineId() {
   String param = getContextEngineIdStr();
   byte[] engineId = new byte[0];
   if (param != null) {
     engineId = SnmpUtilities.toBytes(param);
   }
   return engineId;
 }
Пример #2
0
 /**
  * Returns a string representation of the object.
  *
  * @return The string
  */
 public String toString() {
   StringBuffer buffer = new StringBuffer("SnmpContextv3[");
   buffer.append("host=").append(hostAddr);
   buffer.append(", port=").append(hostPort);
   buffer.append(", socketType=").append(typeSocket);
   buffer.append(", contextEngineId=").append(SnmpUtilities.toHexString(contextEngineId));
   buffer.append(", contextName=").append(contextName);
   buffer.append(", userName="******", useAuthentication=").append(useAuthentication);
   buffer.append(", authenticationProtocol=").append(ProtocolNames[authenticationProtocol]);
   buffer.append(", userAuthenticationPassword="******", usePrivacy=").append(usePrivacy);
   buffer.append(", userPrivacyPassword="******"]");
   return buffer.toString();
 }
Пример #3
0
 byte[] getPrivacyPasswordKeySHA1() {
   if (userPrivKeySHA1 == null) {
     userPrivKeySHA1 = SnmpUtilities.passwordToKeySHA1(userPrivacyPassword);
   }
   return userPrivKeySHA1;
 }
Пример #4
0
 byte[] getPrivacyPasswordKeyMD5() {
   if (userPrivKeyMD5 == null) {
     userPrivKeyMD5 = SnmpUtilities.passwordToKeyMD5(userPrivacyPassword);
   }
   return userPrivKeyMD5;
 }
Пример #5
0
 byte[] getAuthenticationPasswordKeySHA1() {
   if (userAuthKeySHA1 == null) {
     userAuthKeySHA1 = SnmpUtilities.passwordToKeySHA1(userAuthenticationPassword);
   }
   return userAuthKeySHA1;
 }
Пример #6
0
 byte[] getAuthenticationPasswordKeyMD5() {
   if (userAuthKeyMD5 == null) {
     userAuthKeyMD5 = SnmpUtilities.passwordToKeyMD5(userAuthenticationPassword);
   }
   return userAuthKeyMD5;
 }