Sha256: b04b449a82858f7addeab992594380f49a93745b77543e72ce1c18c8291b0f2f

Contents?: true

Size: 543 Bytes

Versions: 5

Compression:

Stored size: 543 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

      def inspect(level=0)
        str = common_inspect(level)
        str << " #{value.inspect}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rasn1-0.12.0 lib/rasn1/types/octet_string.rb
rasn1-0.11.0 lib/rasn1/types/octet_string.rb
rasn1-0.10.0 lib/rasn1/types/octet_string.rb
rasn1-0.9.0 lib/rasn1/types/octet_string.rb
rasn1-0.8.0 lib/rasn1/types/octet_string.rb