1package org.bouncycastle.crypto.params;
2
3import org.bouncycastle.crypto.CipherParameters;
4
5public class RC2Parameters
6    implements CipherParameters
7{
8    private byte[]  key;
9    private int     bits;
10
11    public RC2Parameters(
12        byte[]  key)
13    {
14        this(key, (key.length > 128) ? 1024 : (key.length * 8));
15    }
16
17    public RC2Parameters(
18        byte[]  key,
19        int     bits)
20    {
21        this.key = new byte[key.length];
22        this.bits = bits;
23
24        System.arraycopy(key, 0, this.key, 0, key.length);
25    }
26
27    public byte[] getKey()
28    {
29        return key;
30    }
31
32    public int getEffectiveKeyBits()
33    {
34        return bits;
35    }
36}
37