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