class ASN1::BER::Length
- ASN1::BER::Length
- BinData
- Reference
- Object
Defined in:
bindata/asn1/length.crConstant Summary
-
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 Method Summary
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)
Macro Summary
- asn1_ber(name, onlyif = nil, verify = nil, value = nil)
- asn1_ber_extended_identifier(name, onlyif = nil, verify = nil, value = nil)
- asn1_ber_identifier(name, onlyif = nil, verify = nil, value = nil)
- asn1_ber_length(name, onlyif = nil, verify = nil, value = nil)
- ber(name, onlyif = nil, verify = nil, value = nil)
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)
write
Class methods inherited from class BinData
bit_fields
bit_fields,
from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::SystemEndian)
from_io,
from_slice(bytes : Slice, format : IO::ByteFormat = IO::ByteFormat::SystemEndian)
from_slice
Class Method Detail
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