class ASN1::BER::Length
- ASN1::BER::Length
- BinData
- Reference
- Object
Defined in:
bindata/asn1/length.crConstant Summary
-
BIT_PARTS =
[{long => {UInt8, nil}, length_indicator => {UInt8, nil}}] of Nil
-
ENDIAN =
["big"]
-
INDEX =
[0]
-
PARTS =
[{"bitfield", 0, nil, nil, nil, nil}, {"array", long_bytes, UInt8, nil, -> 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, nil, nil}] of Nil
Instance Method Summary
- #__format__ : IO::ByteFormat
- #indefinite?
-
#length : Int32
We can pretty much safely assume no protocol is implementing more than positive Int32 length datagrams
-
#length=(length : Int32)
We can pretty much safely assume no protocol is implementing more than positive Int32 length datagrams
- #length_indicator : UInt8
- #length_indicator=(length_indicator : UInt8)
- #long : Bool
- #long=(long : UInt8)
- #long=(value : Bool)
- #long_bytes : Array(UInt8)
- #long_bytes=(long_bytes : Array(UInt8))
- #read(io : IO) : IO
- #write(io : IO) : IO
Instance methods inherited from class BinData
__format__ : IO::ByteFormat
__format__,
read(io : IO) : IO
read,
to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::SystemEndian)
to_io,
to_slice
to_slice,
write(io : IO) : IO
write
Class methods inherited from class BinData
from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::SystemEndian)
from_io
Instance Method Detail
def length : Int32
#
We can pretty much safely assume no protocol is implementing more than positive Int32 length datagrams
def length=(length : Int32)
#
We can pretty much safely assume no protocol is implementing more than positive Int32 length datagrams