Class: Net::NTLM::SecurityBuffer

### Home Classes Methods

### In Files

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

### Parent

Object

### Methods

- ::new
- #data_size
- #parse
- #serialize
- #value
- #value=

### 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::SecurityBuffer

### Attributes

active[RW]

### Public Class Methods

new(opts) click to toggle source

    # File lib/net/ntlm.rb, line 486
    def initialize(opts)
      super()
      @value  = opts[:value]
      @active = opts[:active].nil? ? true : opts[:active]
      @size = 8
    end

### Public Instance Methods

data_size() click to toggle source

    # File lib/net/ntlm.rb, line 516
    def data_size
      @active ? @value.size : 0
    end

parse(str, offset=0) click to toggle source

    # File lib/net/ntlm.rb, line 493
    def parse(str, offset=0)
      if @active and str.size >= offset + @size
        super(str, offset)
        @value = str[self.offset, self.length]
        @size
      else
        0
      end
    end

serialize() click to toggle source

    # File lib/net/ntlm.rb, line 503
    def serialize
      super if @active
    end

value() click to toggle source

    # File lib/net/ntlm.rb, line 507
    def value
      @value
    end

value=(val) click to toggle source

    # File lib/net/ntlm.rb, line 511
    def value=(val)
      @value = val
      self.length = self.allocated = val.size
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.