Package org.bouncycastle.jcajce.spec
Class TLSKeyMaterialSpec
- java.lang.Object
-
- org.bouncycastle.jcajce.spec.TLSKeyMaterialSpec
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_EXPANSION
static String
MASTER_SECRET
-
Constructor Summary
Constructors Constructor Description TLSKeyMaterialSpec(byte[] secret, String label, int length, byte[]... seedMaterial)
Constructor specifying the basic parameters for a TLS KDF
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Return the label associated with this spec.int
getLength()
Return the number of bytes of key material to be generated for this spec.byte[]
getSecret()
Return the secret associated with this spec.byte[]
getSeed()
Return the full seed for the spec.
-
-
-
Field Detail
-
MASTER_SECRET
public static final String MASTER_SECRET
- See Also:
- Constant Field Values
-
KEY_EXPANSION
public static final String KEY_EXPANSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TLSKeyMaterialSpec
public TLSKeyMaterialSpec(byte[] secret, String label, int length, byte[]... seedMaterial)
Constructor specifying the basic parameters for a TLS KDF- Parameters:
secret
- secret to uselabel
- e.g. 'master secret', or 'key expansion'length
- number of bytes of material to be generatedseedMaterial
- array of seed material inputs (to be concatenated together)
-
-
Method Detail
-
getLabel
public String getLabel()
Return the label associated with this spec.- Returns:
- the label to be used with the TLS KDF.
-
getLength
public int getLength()
Return the number of bytes of key material to be generated for this spec.- Returns:
- the length in bytes of the result.
-
getSecret
public byte[] getSecret()
Return the secret associated with this spec.- Returns:
- a copy of the secret.
-
getSeed
public byte[] getSeed()
Return the full seed for the spec.- Returns:
- a copy of the seed.
-
-