HOME

com.ireasoning.protocol.snmp
Class UsmUser

java.lang.Object
  extended bycom.ireasoning.protocol.snmp.UsmUser
All Implemented Interfaces:
Serializable

public class UsmUser
extends Object
implements Serializable

This class represents user information (in SNMPV3)

See Also:
Serialized Form

Field Summary
static byte AUTH_NO_PRIV
          securityLevel: Auth No Privacy
static byte AUTH_PRIV
          securityLevel: Auth and Privacy
static byte NO_AUTH_NO_PRIV
          securityLevel: No Auth No Privacy
 
Constructor Summary
UsmUser(String userName, String authProtocol, byte[] authKey, byte[] privKey, byte[] engineID)
          Constructs UsmUser object.
UsmUser(String userName, String authProtocol, int privProtocol, byte[] authKey, byte[] privKey, byte[] engineID)
          Constructs UsmUser object.
UsmUser(String userName, String authProtocol, int privProtocol, byte securityLevel, String authPassword, String privPassword, byte[] engineID)
          Constructs UsmUser object.
UsmUser(String userName, String authProtocol, String authPassword, int privProtocol, String privPassword, byte[] engineID)
          Constructs UsmUser object.
UsmUser(String userName, String authProtocol, String authPassword, String privPassword, byte[] engineID)
          Constructs UsmUser object.
 
Method Summary
 byte[] getAuthKey()
          Returns localized auth key
 String getAuthPassword()
          Returns auth password
 String getAuthProtocol()
          Returns auth protocol
 byte[] getEngineID()
          Returns engine ID
 byte[] getPrivKey()
          Returns localized privacy key
 String getPrivPassword()
          Returns privacy password
 int getPrivProtocol()
          Returns privacy protocol
 byte getSecurityLevel()
          Returns security level
 String getUserName()
          Returns USM user name
 void setAuthKey(byte[] key)
          Sets a new localized auth key
 void setAuthPassword(String authPassword)
          Sets a new auth password
 void setAuthProtocol(String authProtocol)
          Sets a new auth protocol
 void setEngineID(byte[] engineID)
          Sets a new engineID.
 void setPrivKey(byte[] key)
          Sets a new localized privacy key
 void setPrivPassword(String privPassword)
          Sets a new privacy password
 void setPrivProtocol(int priv)
          Sets a new privacy protocol
 void setSecurityLevel(byte level)
          Sets a new security level
 void setUserName(String name)
          Sets a new USM user name
 String toString()
           
 void updateKeys()
          Calculates localized keys
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_AUTH_NO_PRIV

public static final byte NO_AUTH_NO_PRIV
securityLevel: No Auth No Privacy

See Also:
Constant Field Values

AUTH_NO_PRIV

public static final byte AUTH_NO_PRIV
securityLevel: Auth No Privacy

See Also:
Constant Field Values

AUTH_PRIV

public static final byte AUTH_PRIV
securityLevel: Auth and Privacy

See Also:
Constant Field Values
Constructor Detail

UsmUser

public UsmUser(String userName,
               String authProtocol,
               String authPassword,
               String privPassword,
               byte[] engineID)
Constructs UsmUser object.

Parameters:
userName - user name
authProtocol - authentication protocol, one of {SnmpConst2.MD5, SnmpConst2.SHA}
authPassword - authentication password
privPassword - privacy protocol password

UsmUser

public UsmUser(String userName,
               String authProtocol,
               String authPassword,
               int privProtocol,
               String privPassword,
               byte[] engineID)
Constructs UsmUser object.

Parameters:
userName - user name
authProtocol - authentication protocol, one of {SnmpConst2.MD5, SnmpConst2.SHA}
privProtocol - privacy protocol. One of {SnmpConst2.DES, SnmpConst2.AES}
authPassword - authentication password
privPassword - privacy protocol password

UsmUser

public UsmUser(String userName,
               String authProtocol,
               int privProtocol,
               byte securityLevel,
               String authPassword,
               String privPassword,
               byte[] engineID)
Constructs UsmUser object.

Parameters:
userName - user name
authProtocol - authentication protocol, one of {SnmpConst2.MD5, SnmpConst2.SHA}
privProtocol - privacy protocol. One of {SnmpConst2.DES, SnmpConst2.AES}
authPassword - authentication password
privPassword - privacy protocol pass

UsmUser

public UsmUser(String userName,
               String authProtocol,
               byte[] authKey,
               byte[] privKey,
               byte[] engineID)
Constructs UsmUser object.

Parameters:
userName - user name
authProtocol - authentication protocol, one of {SnmpConst2.MD5, SnmpConst2.SHA}
authKey - localized auth key
privKey - localized priv key

UsmUser

public UsmUser(String userName,
               String authProtocol,
               int privProtocol,
               byte[] authKey,
               byte[] privKey,
               byte[] engineID)
Constructs UsmUser object.

Parameters:
userName - user name
authProtocol - authentication protocol, one of {SnmpConst2.MD5, SnmpConst2.SHA}
authKey - localized authentication password
privKey - localized privacy protocol pass
Method Detail

getAuthKey

public byte[] getAuthKey()
Returns localized auth key


setAuthKey

public void setAuthKey(byte[] key)
Sets a new localized auth key


getAuthPassword

public String getAuthPassword()
Returns auth password


getAuthProtocol

public String getAuthProtocol()
Returns auth protocol


getPrivProtocol

public int getPrivProtocol()
Returns privacy protocol


setPrivProtocol

public void setPrivProtocol(int priv)
Sets a new privacy protocol


getPrivKey

public byte[] getPrivKey()
Returns localized privacy key


setPrivKey

public void setPrivKey(byte[] key)
Sets a new localized privacy key


getPrivPassword

public String getPrivPassword()
Returns privacy password


getSecurityLevel

public byte getSecurityLevel()
Returns security level


getUserName

public String getUserName()
Returns USM user name


setUserName

public void setUserName(String name)
Sets a new USM user name


getEngineID

public byte[] getEngineID()
Returns engine ID


setSecurityLevel

public void setSecurityLevel(byte level)
Sets a new security level


setAuthProtocol

public void setAuthProtocol(String authProtocol)
Sets a new auth protocol


setAuthPassword

public void setAuthPassword(String authPassword)
Sets a new auth password


setPrivPassword

public void setPrivPassword(String privPassword)
Sets a new privacy password


setEngineID

public void setEngineID(byte[] engineID)
Sets a new engineID. And privacy key and auth key will be localized again


toString

public String toString()

updateKeys

public void updateKeys()
Calculates localized keys


HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.