Class: RASN1::Types::Set

Inherits:
Sequence show all
Defined in:
lib/rasn1/types/set.rb

Overview

ASN.1 set

A set is a collection of another ASN.1 types.

To encode this ASN.1 example:

Record ::= SET {
  id        INTEGER,
  room  [0] INTEGER OPTIONAL,
  house [1] IMPLICIT INTEGER DEFAULT 0
}

do:

set = RASN1::Types::Set.new
set.value = [
             RASN1::Types::Integer
             RASN1::Types::Integer(explicit: 0, optional: true),
             RASN1::Types::Integer(implicit: 1, default: 0)
            ]

Author:

  • Sylvain Daubert

Constant Summary collapse

TAG =

Set tag value

0x11

Constants inherited from Constructed

Constructed::ASN1_PC

Constants inherited from Base

Base::CLASSES, Base::CLASS_MASK, Base::INDEFINITE_LENGTH, Base::MAX_TAG, Base::UNDUPPABLE_TYPES

Instance Attribute Summary

Attributes inherited from Base

#asn1_class, #default, #name, #value

Method Summary

Methods inherited from Sequence

#[], #initialize, #initialize_copy

Methods inherited from Constructed

#inspect

Methods inherited from Base

#==, #constructed?, encode_type, #explicit?, #implicit?, #initialize, #initialize_copy, #inspect, #optional?, parse, #parse!, #primitive?, #tag, #tagged?, #to_der, #type, type, #value_size

Constructor Details

This class inherits a constructor from RASN1::Types::Sequence