public class BcTlsSecret extends AbstractTlsSecret
Modifier and Type | Field and Description |
---|---|
protected BcTlsCrypto |
crypto |
data
Constructor and Description |
---|
BcTlsSecret(BcTlsCrypto crypto,
byte[] data) |
Modifier and Type | Method and Description |
---|---|
TlsSecret |
deriveUsingPRF(int prfAlgorithm,
java.lang.String label,
byte[] seed,
int length)
Return a new secret based on applying a PRF to this one.
|
protected AbstractTlsCrypto |
getCrypto() |
protected void |
hmacHash(org.bouncycastle.crypto.Digest digest,
byte[] secret,
int secretOff,
int secretLen,
byte[] seed,
byte[] output) |
protected byte[] |
prf_1_0(byte[] secret,
byte[] labelSeed,
int length) |
protected byte[] |
prf_1_2(int prfAlgorithm,
byte[] secret,
byte[] labelSeed,
int length) |
checkAlive, createCipher, destroy, encrypt, extract
protected final BcTlsCrypto crypto
public BcTlsSecret(BcTlsCrypto crypto, byte[] data)
public TlsSecret deriveUsingPRF(int prfAlgorithm, java.lang.String label, byte[] seed, int length)
TlsSecret
prfAlgorithm
- PRF algorithm to use.label
- the label details.seed
- the seed details.length
- the size (in bytes) of the secret to generate.protected AbstractTlsCrypto getCrypto()
getCrypto
in class AbstractTlsSecret
protected void hmacHash(org.bouncycastle.crypto.Digest digest, byte[] secret, int secretOff, int secretLen, byte[] seed, byte[] output)
protected byte[] prf_1_0(byte[] secret, byte[] labelSeed, int length)
protected byte[] prf_1_2(int prfAlgorithm, byte[] secret, byte[] labelSeed, int length)