|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jdmk.snmp.usm.SnmpUsmAlgorithmImpl
com.sun.jdmk.snmp.usm.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,
SnmpEncryptionPair pair)
Decrypts the passed encrypted data using the provided IV parameter. |
SnmpEncryptionPair |
encrypt(byte[] key,
byte[] data,
int dataLength)
Encrypts the passed data with the provided key. |
String |
getAlgorithm()
Deprecated. 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.jdmk.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.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.Method Detail |
public int getKeySize()
getKeySize
in interface SnmpUsmPrivAlgorithm
public int getDeltaSize()
getDeltaSize
in interface SnmpUsmPrivAlgorithm
public String getOid()
getOid
in interface SnmpUsmAlgorithm
public 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, 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
|
FCS Release jdmk-5_1-b34.1 2005.02.10_16:46:09_MET |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |