本文整理汇总了C#中DerObjectIdentifier类的典型用法代码示例。如果您正苦于以下问题:C# DerObjectIdentifier类的具体用法?C# DerObjectIdentifier怎么用?C# DerObjectIdentifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DerObjectIdentifier类属于命名空间,在下文中一共展示了DerObjectIdentifier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ContentHints
public ContentHints(
DerObjectIdentifier contentType,
DerUtf8String contentDescription)
{
this.contentType = contentType;
this.contentDescription = contentDescription;
}
示例2: CertBag
public CertBag(
DerObjectIdentifier certID,
Asn1Object certValue)
{
this.certID = certID;
this.certValue = certValue;
}
示例3: PerformTest
public override void PerformTest()
{
DerUtf8String contentDescription = new DerUtf8String("Description");
DerObjectIdentifier contentType = new DerObjectIdentifier("1.2.2.3");
ContentHints hints = new ContentHints(contentType);
checkConstruction(hints, contentType, null);
hints = new ContentHints(contentType, contentDescription);
checkConstruction(hints, contentType, contentDescription);
hints = ContentHints.GetInstance(null);
if (hints != null)
{
Fail("null GetInstance() failed.");
}
try
{
ContentHints.GetInstance(new Object());
Fail("GetInstance() failed to detect bad object.");
}
catch (ArgumentException)
{
// expected
}
}
示例4: EncryptedContentInfoParser
public EncryptedContentInfoParser(
Asn1SequenceParser seq)
{
_contentType = (DerObjectIdentifier)seq.ReadObject();
_contentEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq.ReadObject().ToAsn1Object());
_encryptedContent = (Asn1TaggedObjectParser)seq.ReadObject();
}
示例5: Attribute
public Attribute(
DerObjectIdentifier attrType,
Asn1Set attrValues)
{
this.attrType = attrType;
this.attrValues = attrValues;
}
示例6: KeySpecificInfo
public KeySpecificInfo(
DerObjectIdentifier algorithm,
Asn1OctetString counter)
{
this.algorithm = algorithm;
this.counter = counter;
}
示例7: AttributeTypeAndValue
public AttributeTypeAndValue(
DerObjectIdentifier type,
Asn1Encodable value)
{
this.type = type;
this.value = value;
}
示例8: QCStatement
public QCStatement(
DerObjectIdentifier qcStatementId,
Asn1Encodable qcStatementInfo)
{
this.qcStatementId = qcStatementId;
this.qcStatementInfo = qcStatementInfo;
}
示例9: OtherRecipientInfo
public OtherRecipientInfo(
DerObjectIdentifier oriType,
Asn1Encodable oriValue)
{
this.oriType = oriType;
this.oriValue = oriValue;
}
示例10: GetConvertedValue
/**
* Apply default conversion for the given value depending on the oid
* and the character range of the value.
*
* @param oid the object identifier for the DN entry
* @param value the value associated with it
* @return the ASN.1 equivalent for the string value.
*/
public override Asn1Object GetConvertedValue(
DerObjectIdentifier oid,
string value)
{
if (value.Length != 0 && value[0] == '#')
{
try
{
return ConvertHexEncoded(value, 1);
}
catch (IOException)
{
throw new Exception("can't recode value for oid " + oid.Id);
}
}
if (oid.Equals(X509Name.EmailAddress) || oid.Equals(X509Name.DC))
{
return new DerIA5String(value);
}
if (oid.Equals(X509Name.DateOfBirth)) // accept time string as well as # (for compatibility)
{
return new DerGeneralizedTime(value);
}
if (oid.Equals(X509Name.C)
|| oid.Equals(X509Name.SerialNumber)
|| oid.Equals(X509Name.DnQualifier))
{
return new DerPrintableString(value);
}
return new DerUtf8String(value);
}
示例11: SigPolicyQualifierInfo
public SigPolicyQualifierInfo(
DerObjectIdentifier sigPolicyQualifierId,
Asn1Encodable sigQualifier)
{
this.sigPolicyQualifierId = sigPolicyQualifierId;
this.sigQualifier = sigQualifier.ToAsn1Object();
}
示例12: ContentInfo
public ContentInfo(
DerObjectIdentifier contentType,
Asn1Encodable content)
{
this.contentType = contentType;
this.content = content;
}
示例13: AlgorithmIdentifier
public AlgorithmIdentifier(
DerObjectIdentifier algorithm,
Asn1Encodable parameters)
{
this.algorithm = algorithm;
this.parameters = parameters;
}
示例14: OtherKeyAttribute
public OtherKeyAttribute(
DerObjectIdentifier keyAttrId,
Asn1Encodable keyAttr)
{
this.keyAttrId = keyAttrId;
this.keyAttr = keyAttr;
}
示例15: GetByOid
/**
* return the X9ECParameters object for the named curve represented by
* the passed in object identifier. Null if the curve isn't present.
*
* @param oid an object identifier representing a named curve, if present.
*/
public static X9ECParameters GetByOid(
DerObjectIdentifier oid)
{
X9ECParametersHolder holder = (X9ECParametersHolder) curves[oid];
return holder == null ? null : holder.Parameters;
}