com.sun.management.snmp.usm
Interface SnmpUsmPrivAlgorithm

All Superinterfaces:
SnmpUsmAlgorithm
All Known Implementing Classes:
SnmpUsmDesAlgorithm

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.1

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

Method Detail

encrypt

com.sun.management.internal.snmp.SnmpEncryptionPair encrypt(byte[] key,
                                                            byte[] data,
                                                            int length)
                                                            throws SnmpUsmException
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

byte[] decrypt(byte[] key,
               com.sun.management.internal.snmp.SnmpEncryptionPair pair)
               throws SnmpUsmException
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

int getKeySize()
The privacy algorithm key size.

Returns:
The key size.

getDeltaSize

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

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

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

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