com.sun.jdmk.snmp.usm
Interface SnmpUsmPrivAlgorithm

All Superinterfaces:
SnmpUsmAlgorithm
All Known Implementing Classes:
SnmpUsmDesAlgorithm

Deprecated. Use package com.sun.management.snmp.usm in preference to classes in this package. This class may be removed in a future version of Java DMK.

public interface SnmpUsmPrivAlgorithm
extends SnmpUsmAlgorithm

Encryption algorithm interface. Every privacy algorithm must be compliant to this interface. When developing your own algorithm you have to implement this interface.

Since:
Java DMK 5.0

Method Summary
 byte[] decrypt(byte[] key, SnmpEncryptionPair pair)
          Deprecated. Decrypt some data using a key.
 SnmpEncryptionPair encrypt(byte[] key, byte[] data, int length)
          Deprecated. Encrypt some data using a key.
 int getDeltaSize()
          Deprecated. Gets the delta size.
 int getKeySize()
          Deprecated. The privacy algorithm key size.
 
Methods inherited from interface com.sun.jdmk.snmp.usm.SnmpUsmAlgorithm
getAlgorithm, getOid
 

Method Detail

encrypt

public SnmpEncryptionPair encrypt(byte[] key,
                                  byte[] data,
                                  int length)
                                                      throws SnmpUsmException
Deprecated. 
Encrypt some data using a key.

Parameters:
key - The key to use.
data - The data to encrypt.
length - The length of the data to encrypt.
Returns:
The encrypted data + parameters.
Throws:
SnmpUsmException

decrypt

public byte[] decrypt(byte[] key,
                      SnmpEncryptionPair pair)
               throws SnmpUsmException
Deprecated. 
Decrypt some data using a key.

Parameters:
key - The key to use.
pair - The data to decrypt and parameters.
Returns:
The decrypted data.
Throws:
SnmpUsmException

getKeySize

public int getKeySize()
Deprecated. 
The privacy algorithm key size.

Returns:
The key size.

getDeltaSize

public int getDeltaSize()
Deprecated. 
Gets the delta size. The returned value is 16.

Specified by:
getDeltaSize in interface SnmpUsmAlgorithm
Returns:
The delta size.

FCS Release
jdmk-5_1-b34.2 2005.11.29_16:24:00_MET

Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.