Class: RubyHome::VerifySRPService

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_home/http/services/verify_srp_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(public_key:, device_proof:, srp_session:) ⇒ VerifySRPService

Returns a new instance of VerifySRPService.



3
4
5
6
7
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 3

def initialize(public_key: , device_proof: , srp_session: )
  @device_proof = device_proof
  @srp_session = srp_session
  @public_key = public_key
end

Instance Method Details

#server_proofObject



22
23
24
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 22

def server_proof
  verify_session_bytes
end

#session_keyObject



18
19
20
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 18

def session_key
  srp_verifier.K
end

#valid?Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
15
16
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 9

def valid?
  return false unless public_key
  return false unless device_proof
  return false unless srp_session
  return false unless valid_session?

  true
end