Sha256: 2933cb8396d739793bf9759e5708467e0e516f25e09f301558b86998166da0f0
Contents?: true
Size: 710 Bytes
Versions: 1
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true module RASN1 module Types # ASN.1 Null # @author Sylvain Daubert class Null < Primitive # Null id value ID = 0x05 # @return [String] def inspect(level=0) str = common_inspect(level)[0..-2] # remove terminal ':' str << ' OPTIONAL' if optional? str end def can_build? !optional? end private def value_to_der '' end def der_to_value(der, ber: false) # rubocop:disable Lint/UnusedMethodArgument raise ASN1Error, 'NULL should not have content!' if der.length.positive? @no_value = true @value = void_value end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rasn1-0.12.0 | lib/rasn1/types/null.rb |