01: package org.bouncycastle.crypto.params;
02:
03: import org.bouncycastle.crypto.CipherParameters;
04:
05: public class RC2Parameters implements CipherParameters {
06: private byte[] key;
07: private int bits;
08:
09: public RC2Parameters(byte[] key) {
10: this (key, (key.length > 128) ? 1024 : (key.length * 8));
11: }
12:
13: public RC2Parameters(byte[] key, int bits) {
14: this .key = new byte[key.length];
15: this .bits = bits;
16:
17: System.arraycopy(key, 0, this .key, 0, key.length);
18: }
19:
20: public byte[] getKey() {
21: return key;
22: }
23:
24: public int getEffectiveKeyBits() {
25: return bits;
26: }
27: }
|