1package org.bouncycastle.operator;
2
3import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
4
5public class GenericKey
6{
7    private AlgorithmIdentifier algorithmIdentifier;
8    private Object representation;
9
10    /**
11     * @deprecated provide an AlgorithmIdentifier.
12     * @param representation key data
13     */
14    public GenericKey(Object representation)
15    {
16        this.algorithmIdentifier = null;
17        this.representation = representation;
18    }
19
20    public GenericKey(AlgorithmIdentifier algorithmIdentifier, byte[] representation)
21    {
22        this.algorithmIdentifier = algorithmIdentifier;
23        this.representation = representation;
24    }
25
26    protected GenericKey(AlgorithmIdentifier algorithmIdentifier, Object representation)
27    {
28        this.algorithmIdentifier = algorithmIdentifier;
29        this.representation = representation;
30    }
31
32    public AlgorithmIdentifier getAlgorithmIdentifier()
33    {
34        return algorithmIdentifier;
35    }
36
37    public Object getRepresentation()
38    {
39        return representation;
40    }
41}
42