Sha256: 5249dd104c1117dbe1c4a84a4b6f1144da06769238876f9c63c7496af4bded8b

Contents?: true

Size: 563 Bytes

Versions: 8

Compression:

Stored size: 563 Bytes

Contents

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
      TAG = 0x04

      def inspect(level=0)
        str = ''
        str << '  ' * level if level > 0
        str << "#{@name} " unless @name.nil?
        str << "#{type}: #{value.inspect}"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rasn1-0.6.8 lib/rasn1/types/octet_string.rb
rasn1-0.6.7 lib/rasn1/types/octet_string.rb
rasn1-0.6.6 lib/rasn1/types/octet_string.rb
rasn1-0.6.5 lib/rasn1/types/octet_string.rb
rasn1-0.6.4 lib/rasn1/types/octet_string.rb
rasn1-0.6.3 lib/rasn1/types/octet_string.rb
rasn1-0.6.2 lib/rasn1/types/octet_string.rb
rasn1-0.6.1 lib/rasn1/types/octet_string.rb