org.bouncycastle.tls.TlsRSAUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bctls-jdk18on Show documentation
Show all versions of bctls-jdk18on Show documentation
The Bouncy Castle Java APIs for TLS and DTLS, including a provider for the JSSE.
The newest version!
package org.bouncycastle.tls;
import java.io.IOException;
import java.io.OutputStream;
import org.bouncycastle.tls.crypto.TlsCertificate;
import org.bouncycastle.tls.crypto.TlsCertificateRole;
import org.bouncycastle.tls.crypto.TlsEncryptor;
import org.bouncycastle.tls.crypto.TlsSecret;
/**
* RSA utility methods.
*/
public abstract class TlsRSAUtils
{
/**
* Generate a pre_master_secret and send it encrypted to the server.
*
* @deprecated Use
* {@link TlsUtils#generateEncryptedPreMasterSecret(TlsContext, TlsEncryptor, OutputStream)}
* instead.
*/
public static TlsSecret generateEncryptedPreMasterSecret(TlsContext context, TlsCertificate certificate,
OutputStream output) throws IOException
{
TlsEncryptor encryptor = certificate.createEncryptor(TlsCertificateRole.RSA_ENCRYPTION);
return TlsUtils.generateEncryptedPreMasterSecret(context, encryptor, output);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy