|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.management.snmp.usm.SnmpUsmDesAlgorithm
public class SnmpUsmDesAlgorithm
This is an implementation of Des encryption algorithm. It is based on JCE. If you use this algorithm, make sure that JCE jar files are accessible.
Field Summary | |
---|---|
static String |
DES_PRIV
Algorithm name as defined in rfc 2574, "usmDESPrivProtocol". |
Constructor Summary | |
---|---|
SnmpUsmDesAlgorithm(SnmpEngine engine)
Constructor. |
|
SnmpUsmDesAlgorithm(SnmpEngine engine,
String properties_encrypt,
String properties_decrypt)
Constructor. |
Method Summary | |
---|---|
byte[] |
decrypt(byte[] key,
com.sun.management.internal.snmp.SnmpEncryptionPair pair)
Decrypts the passed encrypted data using the provided IV parameter. |
com.sun.management.internal.snmp.SnmpEncryptionPair |
encrypt(byte[] key,
byte[] data,
int dataLength)
Encrypts the passed data with the provided key. |
String |
getAlgorithm()
Gets the unique algorithm name. |
int |
getDeltaSize()
Gets the delta size. |
int |
getKeySize()
The privacy algorithm key size. |
String |
getOid()
Gets the algorithm OID as defined in RFC 2574. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.management.snmp.usm.SnmpUsmAlgorithm |
---|
getAlgorithm |
Field Detail |
---|
public static final String DES_PRIV
Constructor Detail |
---|
public SnmpUsmDesAlgorithm(SnmpEngine engine) throws SnmpUsmException
engine
- The local snmp engine.
SnmpUsmException
public SnmpUsmDesAlgorithm(SnmpEngine engine, String properties_encrypt, String properties_decrypt) throws SnmpUsmException
engine
- The local SNMP engine.properties_encrypt
- The String used to instantiate the proper
JCE Cipher encryption object.properties_decrypt
- The String used to instantiate the proper
JCE Cipher decryption object.
SnmpUsmException
Method Detail |
---|
public int getKeySize()
getKeySize
in interface SnmpUsmPrivAlgorithm
public int getDeltaSize()
getDeltaSize
in interface SnmpUsmAlgorithm
getDeltaSize
in interface SnmpUsmPrivAlgorithm
public String getOid()
getOid
in interface SnmpUsmAlgorithm
public com.sun.management.internal.snmp.SnmpEncryptionPair encrypt(byte[] key, byte[] data, int dataLength) throws SnmpUsmException
encrypt
in interface SnmpUsmPrivAlgorithm
key
- The key to use.data
- The data to encrypt.dataLength
- The data length.
SnmpUsmException
public byte[] decrypt(byte[] key, com.sun.management.internal.snmp.SnmpEncryptionPair pair) throws SnmpUsmException
decrypt
in interface SnmpUsmPrivAlgorithm
key
- The Des key.pair
- The data + IV parameter.
SnmpUsmException
public String getAlgorithm()
SnmpUsmAlgorithm
getAlgorithm
in interface SnmpUsmAlgorithm
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |