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(:record)
set.value = [
             RASN1::Types::Integer(:id),
             RASN1::Types::Integer(:id, explicit: 0, optional: true),
             RASN1::Types::Integer(:id, implicit: 1, default: 0)
            ]

Author:

  • Sylvain Daubert

Constant Summary collapse

TAG =
0x11

Constants inherited from Constructed

Constructed::ASN1_PC

Constants inherited from Base

Base::CLASSES, Base::INDEFINITE_LENGTH, Base::MAX_TAG

Instance Attribute Summary

Attributes inherited from Base

#asn1_class, #default, #name, #value

Method Summary

Methods inherited from Base

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

Constructor Details

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