module Matter::Codec::DERCodec::Base

Extended Modules

Direct including types

Defined in:

matter/codec/der_codec.cr

Instance Method Summary

Instance Method Detail

def decode(data : Slice(UInt8)) : Node #

[View source]
def encode(value : Value) : Slice(UInt8) #

[View source]
def encode_length_bytes(value, byte_format : IO::ByteFormat = IO::ByteFormat::BigEndian) #

[View source]
def encode_object_identifier(oid : String | Array(UInt32)) : Slice(UInt8) #

Alias for consistency with other encoding methods


[View source]
def encode_octet_string(data : Bytes) : Bytes #

Encode bytes as DER OCTET STRING Returns DER-encoded OCTET STRING (tag 0x04)


[View source]
def encode_oid(oid : String | Array(UInt32)) : Slice(UInt8) #

Encode OID from dotted decimal notation or array of arcs Returns DER-encoded OBJECT IDENTIFIER bytes


[View source]
def encode_sequence(data : Bytes) : Bytes #

Encode bytes as DER SEQUENCE Returns DER-encoded SEQUENCE (tag 0x30 with constructed bit)


[View source]
def encode_unsigned_int(value : UInt8 | UInt16 | UInt32, byte_format : IO::ByteFormat = IO::ByteFormat::BigEndian) #

[View source]
def parse_oid(oid : String) : Array(UInt32) #

Parse OID from dotted decimal notation (e.g., "1.2.840.10045.4.3.2") Returns array of UInt32 values representing each arc


[View source]