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