class

ASN1::BER::Length

Inherits BinData < Reference < Object

Constants

ENDIAN = ["big"]
KLASS_NAME = [ASN1::BER::Length]
PARTS = [{type: "bitfield", name: 2, cls: ASN1::BER::Length, onlyif: nil, verify: nil}, {type: "array", name: long_bytes, cls: UInt8, onlyif: nil, verify: nil, length: -> do if long && (!indefinite?) if length_indicator > 4 raise("invalid ASN.1 BER length. Number of length bytes: #{length_indicator}") end 0 | length_indicator else 0 end end, value: nil}] of Nil
REMAINING = [] of Nil

Class methods

bit_fields
Source

Instance methods

__format__
Source
indefinite?
Source
length

We can pretty much safely assume no protocol is implementing more than positive Int32 length datagrams

Source
length=(length : Int32)

We can pretty much safely assume no protocol is implementing more than positive Int32 length datagrams

Source
length_indicator
length_indicator=(length_indicator : UInt8)
long
Source
long=(long : UInt8)
long=(value : Bool)
Source
long_bytes
long_bytes=(long_bytes : Array(UInt8))
read(io : IO) : IO
Source
write(io : IO)
Source

Macros

asn1_ber(name, onlyif = nil, verify = nil, value = nil)
Source
asn1_ber_extended_identifier(name, onlyif = nil, verify = nil, value = nil)
Source
asn1_ber_identifier(name, onlyif = nil, verify = nil, value = nil)
Source
asn1_ber_length(name, onlyif = nil, verify = nil, value = nil)
Source
ber(name, onlyif = nil, verify = nil, value = nil)
Source