Sha256: a45b7279e6d56be5627d1cb700a1ea9c2d9cf829450fc2fd85d5cb98f022af3a

Contents?: true

Size: 334 Bytes

Versions: 9

Compression:

Stored size: 334 Bytes

Contents

module RASN1
  module Types

    # ASN.1 Null
    # @author Sylvain Daubert
    class Null < Primitive
      TAG = 0x05

      def value_to_der
        ''
      end

      def der_to_value(der, ber: false)
        raise ASN1Error, "NULL TAG should not have content!" if der.length > 0
        @value = nil
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rasn1-0.6.2 lib/rasn1/types/null.rb
rasn1-0.6.1 lib/rasn1/types/null.rb
rasn1-0.6.0 lib/rasn1/types/null.rb
rasn1-0.5.0 lib/rasn1/types/null.rb
rasn1-0.4.0 lib/rasn1/types/null.rb
rasn1-0.3.1 lib/rasn1/types/null.rb
rasn1-0.3.0 lib/rasn1/types/null.rb
rasn1-0.2.0 lib/rasn1/types/null.rb
rasn1-0.1.0 lib/rasn1/types/null.rb