You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
1.3 KiB

using System;
namespace Org.BouncyCastle.Asn1
{
public class DerOctetString
: Asn1OctetString
{
/// <param name="str">The octets making up the octet string.</param>
public DerOctetString(
byte[] str)
: base(str)
{
}
public DerOctetString(IAsn1Convertible obj)
: this(obj.ToAsn1Object())
{
}
public DerOctetString(Asn1Encodable obj)
: base(obj.GetEncoded(Der))
{
}
[Obsolete]
#pragma warning disable CS0809 // 过时成员重写未过时成员
internal override int EncodedLength(bool withID)
#pragma warning restore CS0809 // 过时成员重写未过时成员
{
return Asn1OutputStream.GetLengthOfEncodingDL(withID, str.Length);
}
[Obsolete]
internal override void Encode(Asn1OutputStream asn1Out, bool withID)
{
asn1Out.WriteEncodingDL(withID, Asn1Tags.OctetString, str);
}
[Obsolete]
internal static void Encode(Asn1OutputStream asn1Out, bool withID, byte[] buf, int off, int len)
{
asn1Out.WriteEncodingDL(withID, Asn1Tags.OctetString, buf, off, len);
}
[Obsolete]
internal static int EncodedLength(bool withID, int contentsLength)
{
return Asn1OutputStream.GetLengthOfEncodingDL(withID, contentsLength);
}
}
}