module PostgresPR::SaltedAuthenticationMixin

Attributes

salt[RW]

Public Class Methods

new(salt) click to toggle source
# File lib/postgres-pr/message.rb, line 173
def initialize(salt)
  @salt = salt
end

Public Instance Methods

dump() click to toggle source
# File lib/postgres-pr/message.rb, line 177
def dump
  raise DumpError unless @salt.size == self.salt_size

  message__dump(4 + self.salt_size) do |buffer|
    buffer.write_int32_network(self.auth_type)
    buffer.write(@salt)
  end
end
parse(buffer) click to toggle source
Calls superclass method
# File lib/postgres-pr/message.rb, line 186
def parse(buffer)
  super do
    @salt = buffer.read(self.salt_size)
  end
end