Creates binary representaiton of a SecBufferDesc structure, including the SecBuffer contained inside.
Methods
- B
- N
- T
- U
Constants
SECBUFFER_TOKEN | = | 2 |
TOKENBUFSIZE | = | 12288 |
SECBUFFER_VERSION | = | 0 |
Class Public methods
new(buffer = nil)
Link
Instance Public methods
bufferSize()
Link
bufferType()
Link
to_p()
Link
# File ../ruby/ext/dl/win32/lib/win32/sspi.rb, line 105 def to_p # Assumption is that when to_p is called we are going to get a packed structure. Therefore, # set @unpacked back to nil so we know to unpack when accessors are next accessed. @unpacked = nil # Assignment of inner structure to variable is very important here. Without it, # will not be able to unpack changes to the structure. Alternative, nested unpacks, # does not work (i.e. @struct.unpack("LLP12")[2].unpack("LLP12") results in "no associated pointer") @sec_buffer ||= [@bufferSize, @type, @buffer].pack("LLP") @struct ||= [SECBUFFER_VERSION, 1, @sec_buffer].pack("LLP") end
token()
Link
Instance Private methods
unpack()
Link
Unpacks the SecurityBufferDesc structure into member variables. We only want to do this once per struct, so the struct is deleted after unpacking.