01: package org.bouncycastle.crypto.agreement.kdf;
02:
03: import org.bouncycastle.asn1.DERObjectIdentifier;
04: import org.bouncycastle.crypto.DerivationParameters;
05:
06: public class DHKDFParameters implements DerivationParameters {
07: private final DERObjectIdentifier algorithm;
08: private final int keySize;
09: private final byte[] z;
10: private final byte[] extraInfo;
11:
12: public DHKDFParameters(DERObjectIdentifier algorithm, int keySize,
13: byte[] z) {
14: this .algorithm = algorithm;
15: this .keySize = keySize;
16: this .z = z;
17: this .extraInfo = null;
18: }
19:
20: public DHKDFParameters(DERObjectIdentifier algorithm, int keySize,
21: byte[] z, byte[] extraInfo) {
22: this .algorithm = algorithm;
23: this .keySize = keySize;
24: this .z = z;
25: this .extraInfo = extraInfo;
26: }
27:
28: public DERObjectIdentifier getAlgorithm() {
29: return algorithm;
30: }
31:
32: public int getKeySize() {
33: return keySize;
34: }
35:
36: public byte[] getZ() {
37: return z;
38: }
39:
40: public byte[] getExtraInfo() {
41: return extraInfo;
42: }
43: }
|