module

Matter::Codec::DERCodec::Base

Instance methods

decode(data : Slice(UInt8)) : Node
Source
encode(value : Value) : Slice(UInt8)
Source
encode_length_bytes(value, byte_format : IO::ByteFormat = IO::ByteFormat::BigEndian)
Source
encode_object_identifier(oid : String | Array(UInt32)) : Slice(UInt8)

Alias for consistency with other encoding methods

Source
encode_octet_string(data : Bytes) : Bytes

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

Source
encode_oid(oid : String | Array(UInt32)) : Slice(UInt8)

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

Source
encode_sequence(data : Bytes) : Bytes

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

Source
encode_unsigned_int(value : UInt8 | UInt16 | UInt32, byte_format : IO::ByteFormat = IO::ByteFormat::BigEndian)
Source
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

Source