1 package org.bouncycastle.crypto.params;
2 
3 import org.bouncycastle.crypto.CipherParameters;
4 
5 import java.security.SecureRandom;
6 
7 public class ParametersWithRandom
8     implements CipherParameters
9 {
10     private SecureRandom        random;
11     private CipherParameters    parameters;
12 
ParametersWithRandom( CipherParameters parameters, SecureRandom random)13     public ParametersWithRandom(
14         CipherParameters    parameters,
15         SecureRandom        random)
16     {
17         this.random = random;
18         this.parameters = parameters;
19     }
20 
ParametersWithRandom( CipherParameters parameters)21     public ParametersWithRandom(
22         CipherParameters    parameters)
23     {
24         this(parameters, new SecureRandom());
25     }
26 
getRandom()27     public SecureRandom getRandom()
28     {
29         return random;
30     }
31 
getParameters()32     public CipherParameters getParameters()
33     {
34         return parameters;
35     }
36 }
37