本文整理汇总了C#中Asn1TaggedObject类的典型用法代码示例。如果您正苦于以下问题:C# Asn1TaggedObject类的具体用法?C# Asn1TaggedObject怎么用?C# Asn1TaggedObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Asn1TaggedObject类属于命名空间,在下文中一共展示了Asn1TaggedObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: PopoPrivKey
private PopoPrivKey(Asn1TaggedObject obj)
{
this.tagNo = obj.TagNo;
switch (tagNo)
{
case thisMessage:
this.obj = DerBitString.GetInstance(obj, false);
break;
case subsequentMessage:
this.obj = SubsequentMessage.ValueOf(DerInteger.GetInstance(obj, false).Value.IntValue);
break;
case dhMAC:
this.obj = DerBitString.GetInstance(obj, false);
break;
case agreeMAC:
this.obj = PKMacValue.GetInstance(obj, false);
break;
case encryptedKey:
this.obj = EnvelopedData.GetInstance(obj, false);
break;
default:
throw new ArgumentException("unknown tag in PopoPrivKey", "obj");
}
}
开发者ID:htlp,项目名称:itextsharp,代码行数:25,代码来源:PopoPrivKey.cs
示例2: Evidence
private Evidence(Asn1TaggedObject tagged)
{
if (tagged.TagNo == 0)
{
this.tstEvidence = TimeStampTokenEvidence.GetInstance(tagged, false);
}
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:7,代码来源:Evidence.cs
示例3: DeclarationOfMajority
private DeclarationOfMajority(
Asn1TaggedObject o)
{
if (o.TagNo > 2)
throw new ArgumentException("Bad tag number: " + o.TagNo);
this.declaration = o;
}
开发者ID:hjgode,项目名称:iTextSharpCF,代码行数:8,代码来源:DeclarationOfMajority.cs
示例4: GetInstance
public static RequestedCertificate GetInstance(
Asn1TaggedObject obj,
bool isExplicit)
{
if (!isExplicit)
throw new ArgumentException("choice item must be explicitly tagged");
return GetInstance(obj.GetObject());
}
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:9,代码来源:RequestedCertificate.cs
示例5: GetInstance
public static DirectoryString GetInstance(
Asn1TaggedObject obj,
bool isExplicit)
{
if (!isExplicit)
throw new ArgumentException("choice item must be explicitly tagged");
return GetInstance(obj.GetObject());
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:9,代码来源:DirectoryString.cs
示例6: GetInstance
/**
* return an OriginatorIdentifierOrKey object from a tagged object.
*
* @param o the tagged object holding the object we want.
* @param explicitly true if the object is meant to be explicitly
* tagged false otherwise.
* @exception ArgumentException if the object held by the
* tagged object cannot be converted.
*/
public static OriginatorIdentifierOrKey GetInstance(
Asn1TaggedObject o,
bool explicitly)
{
if (!explicitly)
{
throw new ArgumentException(
"Can't implicitly tag OriginatorIdentifierOrKey");
}
return GetInstance(o.GetObject());
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:21,代码来源:OriginatorIdentifierOrKey.cs
示例7: DistributionPointName
public DistributionPointName(
Asn1TaggedObject obj)
{
this.type = obj.TagNo;
if (type == FullName)
{
this.name = GeneralNames.GetInstance(obj, false);
}
else
{
this.name = Asn1Set.GetInstance(obj, false);
}
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:14,代码来源:DistributionPointName.cs
示例8: RequestedCertificate
private RequestedCertificate(
Asn1TaggedObject tagged)
{
switch ((Choice) tagged.TagNo)
{
case Choice.AttributeCertificate:
this.attributeCert = Asn1OctetString.GetInstance(tagged, true).GetOctets();
break;
case Choice.PublicKeyCertificate:
this.publicKeyCert = Asn1OctetString.GetInstance(tagged, true).GetOctets();
break;
default:
throw new ArgumentException("unknown tag number: " + tagged.TagNo);
}
}
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:15,代码来源:RequestedCertificate.cs
示例9: Target
/**
* Constructor from Asn1TaggedObject.
*
* @param tagObj The tagged object.
* @throws ArgumentException if the encoding is wrong.
*/
private Target(
Asn1TaggedObject tagObj)
{
switch ((Choice) tagObj.TagNo)
{
case Choice.Name: // GeneralName is already a choice so explicit
targetName = GeneralName.GetInstance(tagObj, true);
break;
case Choice.Group:
targetGroup = GeneralName.GetInstance(tagObj, true);
break;
default:
throw new ArgumentException("unknown tag: " + tagObj.TagNo);
}
}
开发者ID:ktw,项目名称:OutlookPrivacyPlugin,代码行数:21,代码来源:Target.cs
示例10: CertOrEncCert
private CertOrEncCert(Asn1TaggedObject tagged)
{
if (tagged.TagNo == 0)
{
certificate = CmpCertificate.GetInstance(tagged.GetObject());
}
else if (tagged.TagNo == 1)
{
encryptedCert = EncryptedValue.GetInstance(tagged.GetObject());
}
else
{
throw new ArgumentException("unknown tag: " + tagged.TagNo, "tagged");
}
}
开发者ID:ktw,项目名称:OutlookPrivacyPlugin,代码行数:15,代码来源:CertOrEncCert.cs
示例11: CertStatus
public CertStatus(
Asn1TaggedObject choice)
{
this.tagNo = choice.TagNo;
switch (choice.TagNo)
{
case 1:
value = RevokedInfo.GetInstance(choice, false);
break;
case 0:
case 2:
value = DerNull.Instance;
break;
}
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:16,代码来源:CertStatus.cs
示例12: Holder
/**
* Constructor for a holder for an v1 attribute certificate.
*
* @param tagObj The ASN.1 tagged holder object.
*/
public Holder(
Asn1TaggedObject tagObj)
{
switch (tagObj.TagNo)
{
case 0:
baseCertificateID = IssuerSerial.GetInstance(tagObj, false);
break;
case 1:
entityName = GeneralNames.GetInstance(tagObj, false);
break;
default:
throw new ArgumentException("unknown tag in Holder");
}
this.version = 0;
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:22,代码来源:Holder.cs
示例13: PkiArchiveOptions
private PkiArchiveOptions(Asn1TaggedObject tagged)
{
switch (tagged.TagNo)
{
case encryptedPrivKey:
value = EncryptedKey.GetInstance(tagged.GetObject());
break;
case keyGenParameters:
value = Asn1OctetString.GetInstance(tagged, false);
break;
case archiveRemGenPrivKey:
value = DerBoolean.GetInstance(tagged, false);
break;
default:
throw new ArgumentException("unknown tag number: " + tagged.TagNo, "tagged");
}
}
开发者ID:woutersmit,项目名称:NBitcoin,代码行数:17,代码来源:PKIArchiveOptions.cs
示例14: CertStatus
public CertStatus(
Asn1TaggedObject choice)
{
this.tagNo = choice.TagNo;
switch (choice.TagNo)
{
case 1:
value = RevokedInfo.GetInstance(choice, false);
break;
case 0:
case 2:
value = DerNull.Instance;
break;
default:
throw new ArgumentException("Unknown tag encountered: " + choice.TagNo);
}
}
开发者ID:bcgit,项目名称:bc-csharp,代码行数:18,代码来源:CertStatus.cs
示例15: ProofOfPossession
private ProofOfPossession(Asn1TaggedObject tagged)
{
tagNo = tagged.TagNo;
switch (tagNo)
{
case 0:
obj = DerNull.Instance;
break;
case 1:
obj = PopoSigningKey.GetInstance(tagged, false);
break;
case 2:
case 3:
obj = PopoPrivKey.GetInstance(tagged, false);
break;
default:
throw new ArgumentException("unknown tag: " + tagNo, "tagged");
}
}
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:19,代码来源:ProofOfPossession.cs
示例16: GetInstance
/**
* return a OtherRevocationInfoFormat object from a tagged object.
*
* @param obj the tagged object holding the object we want.
* @param explicit true if the object is meant to be explicitly
* tagged false otherwise.
* @exception IllegalArgumentException if the object held by the
* tagged object cannot be converted.
*/
public static OtherRevocationInfoFormat GetInstance(Asn1TaggedObject obj, bool isExplicit)
{
return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
}
开发者ID:woutersmit,项目名称:NBitcoin,代码行数:13,代码来源:OtherRevocationInfoFormat.cs
示例17: GetInstance
public static Time GetInstance(
Asn1TaggedObject obj,
bool explicitly)
{
return GetInstance(obj.GetObject());
}
开发者ID:NicolasDorier,项目名称:bc-csharp,代码行数:6,代码来源:Time.cs
示例18: GetInstance
public static DigestInfo GetInstance(
Asn1TaggedObject obj,
bool explicitly)
{
return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:6,代码来源:DigestInfo.cs
示例19: GetInstance
public static ExtendedKeyUsage GetInstance(
Asn1TaggedObject obj,
bool explicitly)
{
return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
}
开发者ID:htlp,项目名称:itextsharp,代码行数:6,代码来源:ExtendedKeyUsage.cs
示例20: GetInstance
public static DHValidationParms GetInstance(Asn1TaggedObject obj, bool isExplicit)
{
return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
}
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:4,代码来源:DHValidationParms.cs
注:本文中的Asn1TaggedObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论