class Mongo::Auth::Scram256::Conversation
Defines behavior around a single SCRAM-SHA-256 conversation between the client and server.
@api private
Private Instance Methods
digest()
click to toggle source
# File lib/mongo/auth/scram256/conversation.rb, line 57 def digest @digest ||= OpenSSL::Digest::SHA256.new.freeze end
hi(data)
click to toggle source
HI algorithm implementation.
@api private
@see tools.ietf.org/html/rfc5802#section-2.2
@since 2.0.0
# File lib/mongo/auth/scram256/conversation.rb, line 34 def hi(data) OpenSSL::PKCS5.pbkdf2_hmac( data, salt, iterations, digest.size, digest, ) end
salted_password()
click to toggle source
Salted password algorithm implementation.
@api private
@see tools.ietf.org/html/rfc5802#section-3
@since 2.0.0
# File lib/mongo/auth/scram256/conversation.rb, line 51 def salted_password @salted_password ||= CredentialCache.cache(cache_key(:salted_password)) do hi(user.sasl_prepped_password) end end