本文整理匯總了C#中Org.BouncyCastle.Asn1.Asn1Encodable.GetEncoded方法的典型用法代碼示例。如果您正苦於以下問題:C# Asn1Encodable.GetEncoded方法的具體用法?C# Asn1Encodable.GetEncoded怎麽用?C# Asn1Encodable.GetEncoded使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Org.BouncyCastle.Asn1.Asn1Encodable
的用法示例。
在下文中一共展示了Asn1Encodable.GetEncoded方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AddExtension
/**
* add a given extension field for the standard extensions tag (tag 3)
* @throws IOException
*/
public virtual void AddExtension(
DerObjectIdentifier oid,
bool critical,
Asn1Encodable extValue)
{
this.AddExtension(oid, critical, extValue.GetEncoded());
}
示例2: Asn1OctetString
internal Asn1OctetString(
Asn1Encodable obj)
{
try
{
this.str = obj.GetEncoded(Asn1Encodable.Der);
}
catch (IOException e)
{
throw new ArgumentException("Error processing object : " + e.ToString());
}
}
示例3: WriteToGenerator
private static void WriteToGenerator(
Asn1Generator ag,
Asn1Encodable ae)
{
byte[] encoded = ae.GetEncoded();
ag.GetRawOutputStream().Write(encoded, 0, encoded.Length);
}
示例4: ToDerEncoded
private byte[] ToDerEncoded(Asn1Encodable obj)
{
try
{
return obj.GetEncoded(Asn1Encodable.Der);
}
catch (IOException e)
{
throw new CertificateEncodingException("Exception thrown", e);
}
}