nl::Weave::ASN1

此命名空间包含 Weave 中用于处理抽象语法表示法 1 (ASN.1) 的所有接口。

摘要

枚举

@334 枚举
ASN1TagClasses 枚举
ASN1UniversalTags 枚举

类型定义符

ASN1_ERROR typedef
所有 ASN1 子系统错误的基本类型。

函数

DumpASN1(ASN1Reader & reader, const char *prefix, const char *indent)
FormatASN1Error(char *buf, uint16_t bufSize, int32_t err)
bool
如果出现 ASN1 错误,则返回直观易懂的以 NULL 结尾的 C 字符串,用于描述错误。
GetEncodedObjectID(OID oid, const uint8_t *& encodedOID, uint16_t & encodedOIDLen)
bool
GetOIDCategory(OID oid)
OIDCategory
GetOIDName(OID oid)
const char *
HighestBit(uint32_t v)
uint8_t
ParseObjectID(const uint8_t *encodedOID, uint16_t encodedOIDLen)
OID
ReverseBits(uint8_t v)
uint8_t
ReverseBits(uint8_t v)
uint8_t
itoa2(uint32_t val, uint8_t *buf)
void

nl::Weave::ASN1::ASN1Reader
nl::Weave::ASN1::ASN1UniversalTime
nl::Weave::ASN1::ASN1Writer

枚举

@334

 @334

ASN1TagClasses

 ASN1TagClasses

ASN1UniversalTags

 ASN1UniversalTags

类型定义符

ASN1_ERROR

ASN1_CONFIG_ERROR_TYPE ASN1_ERROR

所有 ASN1 子系统错误的基本类型。

此字段被定义为特定于平台或系统的类型。

函数

DumpASN1

ASN1_ERROR DumpASN1(
  ASN1Reader & reader,
  const char *prefix,
  const char *indent
)

FormatASN1Error

bool FormatASN1Error(
  char *buf,
  uint16_t bufSize,
  int32_t err
)

如果出现 ASN1 错误,则返回直观易懂的以 NULL 结尾的 C 字符串,用于描述错误。

具体说明
参数
[in] buf
将在其中放入错误字符串的缓冲区。
[in] bufSize
所提供缓冲区的大小(以字节为单位)。
[in] err
要描述的错误。
返回值
如果说明字符串已写入所提供的缓冲区,则返回 true。
返回值
如果提供的错误不是 ASN1 错误,则返回 false。

GetEncodedObjectID

bool GetEncodedObjectID(
  OID oid,
  const uint8_t *& encodedOID,
  uint16_t & encodedOIDLen
)

GetOIDCategory

OIDCategory GetOIDCategory(
  OID oid
)

GetOIDName

const char * GetOIDName(
  OID oid
)

HighestBit

uint8_t HighestBit(
  uint32_t v
)

ParseObjectID

OID ParseObjectID(
  const uint8_t *encodedOID,
  uint16_t encodedOIDLen
)

ReverseBits

uint8_t ReverseBits(
  uint8_t v
)

ReverseBits

uint8_t ReverseBits(
  uint8_t v
)

itoa2

void itoa2(
  uint32_t val,
  uint8_t *buf
)