add all
This commit is contained in:
55
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/RegTokenControl.cs
vendored
Normal file
55
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/RegTokenControl.cs
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crmf
|
||||
{
|
||||
public class RegTokenControl
|
||||
: IControl
|
||||
{
|
||||
private static readonly DerObjectIdentifier type = CrmfObjectIdentifiers.id_regCtrl_regToken;
|
||||
|
||||
private readonly DerUtf8String token;
|
||||
|
||||
/// <summary>
|
||||
/// Basic constructor - build from a UTF-8 string representing the token.
|
||||
/// </summary>
|
||||
/// <param name="token">UTF-8 string representing the token.</param>
|
||||
public RegTokenControl(DerUtf8String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Basic constructor - build from a string representing the token.
|
||||
/// </summary>
|
||||
/// <param name="token">string representing the token.</param>
|
||||
public RegTokenControl(string token)
|
||||
{
|
||||
this.token = new DerUtf8String(token);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the type of this control.
|
||||
/// </summary>
|
||||
/// <returns>CRMFObjectIdentifiers.id_regCtrl_regToken</returns>
|
||||
public DerObjectIdentifier Type
|
||||
{
|
||||
get { return type; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the token associated with this control (a UTF8String).
|
||||
/// </summary>
|
||||
/// <returns>a UTF8String.</returns>
|
||||
public Asn1Encodable Value
|
||||
{
|
||||
get { return token; }
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user