本文整理汇总了Java中org.bouncycastle.util.io.TeeInputStream类的典型用法代码示例。如果您正苦于以下问题:Java TeeInputStream类的具体用法?Java TeeInputStream怎么用?Java TeeInputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TeeInputStream类属于org.bouncycastle.util.io包,在下文中一共展示了TeeInputStream类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processServerKeyExchange
import org.bouncycastle.util.io.TeeInputStream; //导入依赖的package包/类
public void processServerKeyExchange(InputStream input)
throws IOException
{
SecurityParameters securityParameters = context.getSecurityParameters();
SignerInputBuffer buf = new SignerInputBuffer();
InputStream teeIn = new TeeInputStream(input, buf);
ECDomainParameters curve_params = TlsECCUtils.readECParameters(namedCurves, clientECPointFormats, teeIn);
byte[] point = TlsUtils.readOpaque8(teeIn);
DigitallySigned signed_params = parseSignature(input);
Signer signer = initVerifyer(tlsSigner, signed_params.getAlgorithm(), securityParameters);
buf.updateSigner(signer);
if (!signer.verifySignature(signed_params.getSignature()))
{
throw new TlsFatalAlert(AlertDescription.decrypt_error);
}
this.ecAgreePublicKey = TlsECCUtils.validateECPublicKey(TlsECCUtils.deserializeECPublicKey(
clientECPointFormats, curve_params, point));
}
示例2: processServerKeyExchange
import org.bouncycastle.util.io.TeeInputStream; //导入依赖的package包/类
public void processServerKeyExchange(InputStream input)
throws IOException
{
SecurityParameters securityParameters = context.getSecurityParameters();
SignerInputBuffer buf = new SignerInputBuffer();
InputStream teeIn = new TeeInputStream(input, buf);
ServerDHParams dhParams = ServerDHParams.parse(teeIn);
DigitallySigned signed_params = parseSignature(input);
Signer signer = initVerifyer(tlsSigner, signed_params.getAlgorithm(), securityParameters);
buf.updateSigner(signer);
if (!signer.verifySignature(signed_params.getSignature()))
{
throw new TlsFatalAlert(AlertDescription.decrypt_error);
}
this.dhAgreePublicKey = TlsDHUtils.validateDHPublicKey(dhParams.getPublicKey());
this.dhParameters = validateDHParameters(dhAgreePublicKey.getParameters());
}
示例3: processServerKeyExchange
import org.bouncycastle.util.io.TeeInputStream; //导入依赖的package包/类
public void processServerKeyExchange(InputStream input)
throws IOException
{
SecurityParameters securityParameters = context.getSecurityParameters();
SignerInputBuffer buf = new SignerInputBuffer();
InputStream teeIn = new TeeInputStream(input, buf);
ECDomainParameters curve_params = TlsECCUtils.readECParameters(namedCurves, clientECPointFormats, teeIn);
byte[] point = TlsUtils.readOpaque8(teeIn);
DigitallySigned signed_params = DigitallySigned.parse(context, input);
Signer signer = initVerifyer(tlsSigner, signed_params.getAlgorithm(), securityParameters);
buf.updateSigner(signer);
if (!signer.verifySignature(signed_params.getSignature()))
{
throw new TlsFatalAlert(AlertDescription.decrypt_error);
}
this.ecAgreePublicKey = TlsECCUtils.validateECPublicKey(TlsECCUtils.deserializeECPublicKey(
clientECPointFormats, curve_params, point));
}
示例4: processServerKeyExchange
import org.bouncycastle.util.io.TeeInputStream; //导入依赖的package包/类
public void processServerKeyExchange(InputStream input)
throws IOException
{
SecurityParameters securityParameters = context.getSecurityParameters();
SignerInputBuffer buf = new SignerInputBuffer();
InputStream teeIn = new TeeInputStream(input, buf);
ServerDHParams dhParams = ServerDHParams.parse(teeIn);
DigitallySigned signed_params = DigitallySigned.parse(context, input);
Signer signer = initVerifyer(tlsSigner, signed_params.getAlgorithm(), securityParameters);
buf.updateSigner(signer);
if (!signer.verifySignature(signed_params.getSignature()))
{
throw new TlsFatalAlert(AlertDescription.decrypt_error);
}
this.dhAgreePublicKey = TlsDHUtils.validateDHPublicKey(dhParams.getPublicKey());
this.dhParameters = dhAgreePublicKey.getParameters();
}
示例5: processServerKeyExchange
import org.bouncycastle.util.io.TeeInputStream; //导入依赖的package包/类
public void processServerKeyExchange(InputStream input)
throws IOException
{
SecurityParameters securityParameters = context.getSecurityParameters();
SignerInputBuffer buf = new SignerInputBuffer();
InputStream teeIn = new TeeInputStream(input, buf);
ServerDHParams params = ServerDHParams.parse(teeIn);
DigitallySigned signed_params = DigitallySigned.parse(context, input);
Signer signer = initVerifyer(tlsSigner, signed_params.getAlgorithm(), securityParameters);
buf.updateSigner(signer);
if (!signer.verifySignature(signed_params.getSignature()))
{
throw new TlsFatalAlert(AlertDescription.decrypt_error);
}
this.dhAgreeServerPublicKey = TlsDHUtils.validateDHPublicKey(params.getPublicKey());
}
示例6: getInputStream
import org.bouncycastle.util.io.TeeInputStream; //导入依赖的package包/类
public InputStream getInputStream(InputStream dataIn)
{
if (operator instanceof InputDecryptor)
{
return ((InputDecryptor)operator).getInputStream(dataIn);
}
else
{
return new TeeInputStream(dataIn, ((MacCalculator)operator).getOutputStream());
}
}