|
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ireasoning.protocol.snmp.UsmUser
This class represents user information (in SNMPV3)
| 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(java.lang.String userName,
java.lang.String authProtocol,
byte[] authKey,
byte[] privKey,
byte[] engineID)
Constructs UsmUser object. |
|
UsmUser(java.lang.String userName,
java.lang.String authProtocol,
int privProtocol,
byte[] authKey,
byte[] privKey,
byte[] engineID)
Constructs UsmUser object. |
|
UsmUser(java.lang.String userName,
java.lang.String authProtocol,
int privProtocol,
byte securityLevel,
java.lang.String authPassword,
java.lang.String privPassword,
byte[] engineID)
Constructs UsmUser object. |
|
UsmUser(java.lang.String userName,
java.lang.String authProtocol,
java.lang.String authPassword,
int privProtocol,
java.lang.String privPassword,
byte[] engineID)
Constructs UsmUser object. |
|
UsmUser(java.lang.String userName,
java.lang.String authProtocol,
java.lang.String authPassword,
java.lang.String privPassword,
byte[] engineID)
Constructs UsmUser object. |
|
| Method Summary | |
static byte[] |
generateKey(java.lang.String algorithm,
java.lang.String password,
byte[] engineID)
Creates localized key |
static byte[] |
generateKey(java.lang.String authProtocol,
java.lang.String password,
byte[] engineID,
int privProtocol)
Generates privacy key for different privacy protocols |
byte[] |
getAuthKey()
Returns localized auth key |
java.lang.String |
getAuthPassword()
Returns auth password |
java.lang.String |
getAuthProtocol()
Returns auth protocol |
byte[] |
getEngineID()
Returns engine ID |
static int |
getPriv(java.lang.String priv)
|
byte[] |
getPrivKey()
Returns localized privacy key |
java.lang.String |
getPrivPassword()
Returns privacy password |
int |
getPrivProtocol()
Returns privacy protocol |
byte |
getSecurityLevel()
Returns security level |
java.lang.String |
getUserName()
Returns USM user name |
void |
setAuthKey(byte[] key)
Sets a new localized auth key |
void |
setAuthPassword(java.lang.String authPassword)
Sets a new auth password |
void |
setAuthProtocol(java.lang.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(java.lang.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(java.lang.String name)
Sets a new USM user name |
java.lang.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 |
public static final byte NO_AUTH_NO_PRIV
public static final byte AUTH_NO_PRIV
public static final byte AUTH_PRIV
| Constructor Detail |
public UsmUser(java.lang.String userName,
java.lang.String authProtocol,
java.lang.String authPassword,
java.lang.String privPassword,
byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst2.MD5,
SnmpConst2.SHA}authPassword - authentication passwordprivPassword - privacy protocol password
public UsmUser(java.lang.String userName,
java.lang.String authProtocol,
java.lang.String authPassword,
int privProtocol,
java.lang.String privPassword,
byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst.MD5,
SnmpConst.SHA}privProtocol - privacy protocol. One of {SnmpConst.DES, SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256}authPassword - authentication passwordprivPassword - privacy protocol password
public UsmUser(java.lang.String userName,
java.lang.String authProtocol,
int privProtocol,
byte securityLevel,
java.lang.String authPassword,
java.lang.String privPassword,
byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst.MD5,
SnmpConst.SHA}privProtocol - privacy protocol. One of {SnmpConst.DES, SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256}authPassword - authentication passwordprivPassword - privacy protocol pass
public UsmUser(java.lang.String userName,
java.lang.String authProtocol,
byte[] authKey,
byte[] privKey,
byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst2.MD5,
SnmpConst2.SHA}authKey - localized auth keyprivKey - localized priv key
public UsmUser(java.lang.String userName,
java.lang.String authProtocol,
int privProtocol,
byte[] authKey,
byte[] privKey,
byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst2.MD5,
SnmpConst2.SHA}authKey - localized authentication passwordprivKey - localized privacy protocol pass| Method Detail |
public byte[] getAuthKey()
public void setAuthKey(byte[] key)
key - localized auth keypublic java.lang.String getAuthPassword()
public java.lang.String getAuthProtocol()
public int getPrivProtocol()
public void setPrivProtocol(int priv)
public byte[] getPrivKey()
public void setPrivKey(byte[] key)
key - localized priv keypublic java.lang.String getPrivPassword()
public byte getSecurityLevel()
public java.lang.String getUserName()
public void setUserName(java.lang.String name)
public byte[] getEngineID()
public void setSecurityLevel(byte level)
public void setAuthProtocol(java.lang.String authProtocol)
public void setAuthPassword(java.lang.String authPassword)
public void setPrivPassword(java.lang.String privPassword)
public void setEngineID(byte[] engineID)
public java.lang.String toString()
public void updateKeys()
public static byte[] generateKey(java.lang.String authProtocol,
java.lang.String password,
byte[] engineID,
int privProtocol)
throws java.security.NoSuchAlgorithmException
privProtocol - one of {SnmpConst.DES", SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256 }
java.security.NoSuchAlgorithmException
public static byte[] generateKey(java.lang.String algorithm,
java.lang.String password,
byte[] engineID)
throws java.security.NoSuchAlgorithmException
algorithm - algorithm for creating digest, either SnmpConst1.MD5 or SnmpConst2.SHA.password - auth or priv passwordsengineID - SNMPv3 engine ID
java.security.NoSuchAlgorithmExceptionpublic static int getPriv(java.lang.String priv)
priv - privacy protocol. If priv is null, SnmpConst.DES is returned.
Valid values are: DES, AES, AES192, AES256
|
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||