using System;
using Org.BouncyCastle.Asn1;
using Org.BouncyCastle.Asn1.Crmf;
namespace Org.BouncyCastle.Crmf
{
///
/// Carrier for an authenticator control.
///
public class AuthenticatorControl
: IControl
{
private readonly DerUtf8String m_token;
///
/// Basic constructor - build from a UTF-8 string representing the token.
///
/// UTF-8 string representing the token.
public AuthenticatorControl(DerUtf8String token)
{
m_token = token;
}
///
/// Basic constructor - build from a string representing the token.
///
/// string representing the token.
public AuthenticatorControl(string token)
{
m_token = new DerUtf8String(token);
}
///
/// Return the type of this control.
///
public DerObjectIdentifier Type => CrmfObjectIdentifiers.id_regCtrl_authenticator;
///
/// Return the token associated with this control (a UTF8String).
///
public Asn1Encodable Value => m_token;
}
}