01: package org.bouncycastle.jce.spec;
02:
03: import java.security.spec.AlgorithmParameterSpec;
04:
05: /**
06: * Parameter spec for an integrated encryptor, as in IEEE P1363a
07: */
08: public class IESParameterSpec implements AlgorithmParameterSpec {
09: private byte[] derivation;
10: private byte[] encoding;
11: private int macKeySize;
12:
13: public IESParameterSpec(byte[] derivation, byte[] encoding,
14: int macKeySize) {
15: this .derivation = new byte[derivation.length];
16: System.arraycopy(derivation, 0, this .derivation, 0,
17: derivation.length);
18:
19: this .encoding = new byte[encoding.length];
20: System
21: .arraycopy(encoding, 0, this .encoding, 0,
22: encoding.length);
23:
24: this .macKeySize = macKeySize;
25: }
26:
27: /**
28: * return the derivation vector.
29: */
30: public byte[] getDerivationV() {
31: return derivation;
32: }
33:
34: /**
35: * return the encoding vector.
36: */
37: public byte[] getEncodingV() {
38: return encoding;
39: }
40:
41: /**
42: * return the key size in bits for the MAC used with the message
43: */
44: public int getMacKeySize() {
45: return macKeySize;
46: }
47: }
|