01: package org.bouncycastle.crypto.params;
02:
03: import org.bouncycastle.crypto.CipherParameters;
04:
05: public class RC5Parameters implements CipherParameters {
06: private byte[] key;
07: private int rounds;
08:
09: public RC5Parameters(byte[] key, int rounds) {
10: if (key.length > 255) {
11: throw new IllegalArgumentException(
12: "RC5 key length can be no greater than 255");
13: }
14:
15: this .key = new byte[key.length];
16: this .rounds = rounds;
17:
18: System.arraycopy(key, 0, this .key, 0, key.length);
19: }
20:
21: public byte[] getKey() {
22: return key;
23: }
24:
25: public int getRounds() {
26: return rounds;
27: }
28: }
|