Module: PostgresPR::SaltedAuthentificationMixin
- Included in:
- AuthentificationCryptPassword, AuthentificationMD5Password
- 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.
167 168 169 |
# File 'lib/postgres-pr/message.rb', line 167 def salt @salt end |
Instance Method Details
#dump ⇒ Object
173 174 175 176 177 178 179 180 |
# File 'lib/postgres-pr/message.rb', line 173 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
169 170 171 |
# File 'lib/postgres-pr/message.rb', line 169 def initialize(salt) @salt = salt end |
#parse(buffer) ⇒ Object
182 183 184 185 186 |
# File 'lib/postgres-pr/message.rb', line 182 def parse(buffer) super do @salt = buffer.read(self.salt_size) end end |