openssh_key.pascal_style_byte_stream.PascalStyleFormatInstructionStringLengthSize¶
- class openssh_key.pascal_style_byte_stream.PascalStyleFormatInstructionStringLengthSize(format_instruction: openssh_key.pascal_style_byte_stream.PascalStyleFormatInstruction, string_length_size: int)¶
Bases:
NamedTupleA format instruction for a variable-length value, and the size, in bytes, of the unsigned
intprefix describing the value’s length in bytes.Example
Reading
b'\x00\x00\x03abc'with aformat_instructionofPascalStyleFormatInstruction.STRINGand astring_length_sizeof3yields astr, viz.'abc'.- __init__()¶
Methods
__init__()count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
Attributes
The format instruction.
The size of the length prefix.
- count(value, /)¶
Return number of occurrences of value.
- format_instruction: openssh_key.pascal_style_byte_stream.PascalStyleFormatInstruction¶
The format instruction.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.