class Watobo::NTLM::SecurityBuffer
Attributes
active[RW]
Public Class Methods
new(opts)
click to toggle source
Calls superclass method
Watobo::NTLM::FieldSet::new
# File lib/watobo/utils/ntlm.rb, line 541 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/watobo/utils/ntlm.rb, line 571 def data_size @active ? @value.size : 0 end
parse(str, offset=0)
click to toggle source
Calls superclass method
Watobo::NTLM::FieldSet#parse
# File lib/watobo/utils/ntlm.rb, line 548 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
Calls superclass method
Watobo::NTLM::FieldSet#serialize
# File lib/watobo/utils/ntlm.rb, line 558 def serialize super if @active end
value()
click to toggle source
# File lib/watobo/utils/ntlm.rb, line 562 def value @value end
value=(val)
click to toggle source
# File lib/watobo/utils/ntlm.rb, line 566 def value=(val) @value = val self.length = self.allocated = val.size end