Sha256: 19c24bb1a16852546393daf091b2b736757786599405235b8ecb5aabd6adecd0

Contents?: true

Size: 601 Bytes

Versions: 3

Compression:

Stored size: 601 Bytes

Contents

# frozen_string_literal: true

module RASN1
  module Types
    # ASN.1 Octet String
    #
    # An OCTET STRINT may contain another primtive object:
    #  os = OctetString.new
    #  int = Integer.new
    #  int.value = 12
    #  os.value = int
    #  os.to_der   # => DER string with INTEGER in OCTET STRING
    # @author Sylvain Daubert
    class OctetString < Primitive
      # OctetString id value
      ID = 4

      # @param [::Integer] level
      # @return [String]
      def inspect(level=0)
        str = common_inspect(level)
        str << " #{value.inspect}"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rasn1-0.13.1 lib/rasn1/types/octet_string.rb
rasn1-0.13.0 lib/rasn1/types/octet_string.rb
rasn1-0.12.1 lib/rasn1/types/octet_string.rb