Class: Net::NTLM::Message

### Home Classes Methods

### In Files

- lib/net/ntlm.rb
- lib/net/ntlm_http.rb

### Parent

Net::NTLM::FieldSet

### Namespace

- CLASS Net::NTLM::Message::Type1
- CLASS Net::NTLM::Message::Type2
- CLASS Net::NTLM::Message::Type3

### Methods

- ::decode64
- ::parse
- #data_size
- #decode64
- #dump_flags
- #encode64
- #has_flag?
- #head_size
- #serialize
- #set_flag
- #size

### Files

- README

### Class/Module Index

Quicksearch

- Net
- Net::HTTP
- Net::HTTPHeader
- Net::HTTPRequest
- Net::NTLM
- Net::NTLM::Field
- Net::NTLM::FieldSet
- Net::NTLM::Int16LE
- Net::NTLM::Int32LE
- Net::NTLM::Int64LE
- Net::NTLM::Message
- Net::NTLM::Message::Type1
- Net::NTLM::Message::Type2
- Net::NTLM::Message::Type3
- Net::NTLM::SecurityBuffer
- Net::NTLM::String

No matching classes.

# Net::NTLM::Message

### Constants

Type0

  sub class definitions

Type1
Type2
Type3

### Public Class Methods

decode64(str) click to toggle source

    # File lib/net/ntlm.rb, line 539
    def decode64(str)
      parse(Base64.decode64(str))
    end

parse(str) click to toggle source

    # File lib/net/ntlm.rb, line 523
    def parse(str)
      m = Type0.new
      m.parse(str)
      case m.type
      when 1
        t = Type1.parse(str)
      when 2
        t = Type2.parse(str)
      when 3
        t = Type3.parse(str)
      else
        raise ArgumentError, "unknown type: #{m.type}"
      end
      t
    end

### Public Instance Methods

data_size() click to toggle source

    # File lib/net/ntlm.rb, line 571
    def data_size
      security_buffers.inject(0){|sum, a| sum += a[1].data_size}
    end

decode64(str) click to toggle source

    # File lib/net/ntlm.rb, line 565
    def decode64(str)
      parse(Base64.decode64(str))
    end

dump_flags() click to toggle source

    # File lib/net/ntlm.rb, line 552
    def dump_flags
      FLAG_KEYS.each{ |k| print(k, "=", flag?(k), "\n") }
    end

encode64() click to toggle source

    # File lib/net/ntlm.rb, line 561
    def encode64
      Base64.encode64(serialize).gsub(/\n/, '')
    end

has_flag?(flag) click to toggle source

    # File lib/net/ntlm.rb, line 544
    def has_flag?(flag)
      (self[:flag].value & FLAGS[flag]) == FLAGS[flag]
    end

head_size() click to toggle source
Alias for: size
serialize() click to toggle source

    # File lib/net/ntlm.rb, line 556
    def serialize
      deflag
      super + security_buffers.map{|n, f| f.value}.join
    end

set_flag(flag) click to toggle source

    # File lib/net/ntlm.rb, line 548
    def set_flag(flag)
      self[:flag].value  |= FLAGS[flag]
    end

size() click to toggle source

    # File lib/net/ntlm.rb, line 575
    def size
      head_size + data_size
    end

Also aliased as: head_size, head_size

[Validate]

Generated with the Darkfish Rdoc Generator 2.