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.
150 151 152 |
# File 'lib/postgres-pr/message.rb', line 150 def salt @salt end |
Instance Method Details
#dump ⇒ Object
156 157 158 159 160 161 162 163 |
# File 'lib/postgres-pr/message.rb', line 156 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
152 153 154 |
# File 'lib/postgres-pr/message.rb', line 152 def initialize(salt) @salt = salt end |
#parse(buffer) ⇒ Object
165 166 167 168 169 |
# File 'lib/postgres-pr/message.rb', line 165 def parse(buffer) super do @salt = buffer.read(self.salt_size) end end |