培训考核三期,新版培训,网页版培训登录器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

56 lines
1.6 KiB

#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
#pragma warning disable
using System;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
{
/**
* a holding class for public/private parameter pairs.
*/
public class AsymmetricCipherKeyPair
{
private readonly AsymmetricKeyParameter publicParameter;
private readonly AsymmetricKeyParameter privateParameter;
/**
* basic constructor.
*
* @param publicParam a public key parameters object.
* @param privateParam the corresponding private key parameters.
*/
public AsymmetricCipherKeyPair(
AsymmetricKeyParameter publicParameter,
AsymmetricKeyParameter privateParameter)
{
if (publicParameter.IsPrivate)
throw new ArgumentException("Expected a public key", "publicParameter");
if (!privateParameter.IsPrivate)
throw new ArgumentException("Expected a private key", "privateParameter");
this.publicParameter = publicParameter;
this.privateParameter = privateParameter;
}
/**
* return the public key parameters.
*
* @return the public key parameters.
*/
public AsymmetricKeyParameter Public
{
get { return publicParameter; }
}
/**
* return the private key parameters.
*
* @return the private key parameters.
*/
public AsymmetricKeyParameter Private
{
get { return privateParameter; }
}
}
}
#pragma warning restore
#endif