KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > security > DecryptParams


1 /*_############################################################################
2   _##
3   _## SNMP4J - DecryptParams.java
4   _##
5   _## Copyright 2003-2007 Frank Fock and Jochen Katz (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21
22
23
24
25 package org.snmp4j.security;
26
27 /**
28  * Parameter class for encrypt and decrypt methods of {@link SecurityProtocol}.
29  * @author Jochen Katz
30  * @version 1.0
31  */

32 public class DecryptParams
33 {
34   /**
35    * Initialize with the given value.
36    * @param array
37    * the array as received on the wire
38    * @param offset
39    * offset within the array
40    * @param length
41    * length of the decrypt params
42    */

43   public DecryptParams(byte[] array, int offset, int length)
44   {
45     this.array = array;
46     this.offset = offset;
47     this.length = length;
48   }
49
50   /**
51    * Inizialize with null values.
52    */

53   public DecryptParams()
54   {
55     this.array = null;
56     this.offset = 0;
57     this.length = 0;
58   }
59
60   /**
61    * Initialize with the given value.
62    * @param array
63    * the array as received on the wire
64    * @param offset
65    * offset within the array
66    * @param length
67    * length of the decrypt params
68    */

69   public void setValues(byte[] array, int offset, int length)
70   {
71     this.array = array;
72     this.offset = offset;
73     this.length = length;
74   }
75
76   public byte[] array;
77   public int offset;
78   public int length;
79 }
80
Popular Tags