Module: PostgresPR::SaltedAuthenticationMixin
- Included in:
- AuthenticationCryptPassword, AuthenticationMD5Password
- Defined in:
- lib/postgres-pr/message.rb
Instance Attribute Summary collapse
-
#salt ⇒ Object
Returns the value of attribute salt.
Instance Method Summary collapse
Instance Attribute Details
#salt ⇒ Object
Returns the value of attribute salt.
171 172 173 |
# File 'lib/postgres-pr/message.rb', line 171 def salt @salt end |
Instance Method Details
#dump ⇒ Object
177 178 179 180 181 182 183 184 |
# File 'lib/postgres-pr/message.rb', line 177 def dump raise DumpError unless @salt.size == self.salt_size (4 + self.salt_size) do |buffer| buffer.write_int32_network(self.auth_type) buffer.write(@salt) end end |
#initialize(salt) ⇒ Object
173 174 175 |
# File 'lib/postgres-pr/message.rb', line 173 def initialize(salt) @salt = salt end |
#parse(buffer) ⇒ Object
186 187 188 189 190 |
# File 'lib/postgres-pr/message.rb', line 186 def parse(buffer) super do @salt = buffer.read(self.salt_size) end end |