org.bouncycastle.tls.BasicTlsPSKExternal Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bctls-lts8on Show documentation
Show all versions of bctls-lts8on Show documentation
The Bouncy Castle Java APIs for the TLS, including a JSSE provider. The APIs are designed primarily to be used in conjunction with the BC LTS provider but may also be used with other providers providing cryptographic services.
package org.bouncycastle.tls;
import org.bouncycastle.tls.crypto.TlsSecret;
import org.bouncycastle.util.Arrays;
public class BasicTlsPSKExternal
implements TlsPSKExternal
{
protected final byte[] identity;
protected final TlsSecret key;
protected final int prfAlgorithm;
public BasicTlsPSKExternal(byte[] identity, TlsSecret key)
{
this(identity, key, PRFAlgorithm.tls13_hkdf_sha256);
}
public BasicTlsPSKExternal(byte[] identity, TlsSecret key, int prfAlgorithm)
{
this.identity = Arrays.clone(identity);
this.key = key;
this.prfAlgorithm = prfAlgorithm;
}
public byte[] getIdentity()
{
return identity;
}
public TlsSecret getKey()
{
return key;
}
public int getPRFAlgorithm()
{
return prfAlgorithm;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy