01: package org.bouncycastle.crypto.params;
02:
03: import org.bouncycastle.crypto.CipherParameters;
04:
05: import java.security.SecureRandom;
06:
07: public class ParametersWithRandom implements CipherParameters {
08: private SecureRandom random;
09: private CipherParameters parameters;
10:
11: public ParametersWithRandom(CipherParameters parameters,
12: SecureRandom random) {
13: this .random = random;
14: this .parameters = parameters;
15: }
16:
17: public ParametersWithRandom(CipherParameters parameters) {
18: this (parameters, new SecureRandom());
19: }
20:
21: public SecureRandom getRandom() {
22: return random;
23: }
24:
25: public CipherParameters getParameters() {
26: return parameters;
27: }
28: }
|